SNAT: fixed bug in fallback to 3-tuple key for non TCP/UDP sessions 98/7498/2
authorMatus Fabian <matfabia@cisco.com>
Mon, 10 Jul 2017 06:31:41 +0000 (23:31 -0700)
committerOle Trøan <otroan@employees.org>
Tue, 11 Jul 2017 07:48:57 +0000 (07:48 +0000)
Change-Id: I1c4d5f92ec841b1cfe1a33eab4bb94e4001d0411
Signed-off-by: Matus Fabian <matfabia@cisco.com>
src/plugins/snat/in2out.c

index d3fb92f..9b09902 100644 (file)
@@ -1093,6 +1093,10 @@ snat_in2out_unknown_proto (snat_main_t *sm,
               while (ses_index != ~0)
                 {
                   s =  pool_elt_at_index (tsm->sessions, ses_index);
+                  elt_index = elt->next;
+                  elt = pool_elt_at_index (tsm->list_pool, elt_index);
+                  ses_index = elt->value;
+
                   if (s->ext_host_addr.as_u32 == ip->dst_address.as_u32)
                     {
                       new_addr = ip->src_address.as_u32 = s->out2in.addr.as_u32;