X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fplugins%2Fnat%2Fout2in.c;h=74d20888f574e053950d799302ed96c63497679e;hb=8c8acc0;hp=9cace08c5652c78b65871962557d3ba85e7e3c95;hpb=178cf493d009995b28fdf220f04c98860ff79a9b;p=vpp.git diff --git a/src/plugins/nat/out2in.c b/src/plugins/nat/out2in.c index 9cace08c565..74d20888f57 100755 --- a/src/plugins/nat/out2in.c +++ b/src/plugins/nat/out2in.c @@ -29,6 +29,7 @@ #include #include #include +#include #include #include @@ -132,6 +133,11 @@ nat44_o2i_is_idle_session_cb (clib_bihash_kv_8_8_t * kv, void *arg) s->out2in.port, s->in2out.fib_index); + nat_syslog_nat44_apmdel (s->user_index, s->in2out.fib_index, + &s->in2out.addr, s->in2out.port, + &s->out2in.addr, s->out2in.port, + s->in2out.protocol); + if (!snat_is_session_static (s)) snat_free_outside_address_and_port (sm->addresses, ctx->thread_index, &s->out2in); @@ -229,6 +235,11 @@ create_session_for_static_mapping (snat_main_t * sm, s->in2out.protocol, s->in2out.port, s->out2in.port, s->in2out.fib_index); + + nat_syslog_nat44_apmadd (s->user_index, s->in2out.fib_index, + &s->in2out.addr, s->in2out.port, &s->out2in.addr, + s->out2in.port, s->in2out.protocol); + return s; } @@ -1443,6 +1454,12 @@ nat44_out2in_reass_node_fn (vlib_main_t * vm, node->errors[SNAT_OUT2IN_ERROR_NO_TRANSLATION]; next0 = SNAT_OUT2IN_NEXT_DROP; } + else + { + reass0->flags |= NAT_REASS_FLAG_ED_DONT_TRANSLATE; + nat_ip4_reass_get_frags (reass0, + &fragments_to_loopback); + } goto trace0; } @@ -1474,6 +1491,8 @@ nat44_out2in_reass_node_fn (vlib_main_t * vm, } else { + if (reass0->flags & NAT_REASS_FLAG_ED_DONT_TRANSLATE) + goto trace0; if (PREDICT_FALSE (reass0->sess_index == (u32) ~ 0)) { if (nat_ip4_reass_add_fragment