From 235a47e371c8ffea352790c001ef39876f2aaef5 Mon Sep 17 00:00:00 2001 From: Matus Fabian Date: Mon, 25 Jun 2018 16:42:36 -0700 Subject: NAT44: fix nat44_ed_not_translate_output_feature (VPP-1329) Change-Id: Iddb0b848c53da03116524e203c7112c82b401ac5 Signed-off-by: Matus Fabian --- src/plugins/nat/in2out.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/plugins/nat/in2out.c b/src/plugins/nat/in2out.c index aedcae953c1..2a41b952892 100755 --- a/src/plugins/nat/in2out.c +++ b/src/plugins/nat/in2out.c @@ -2543,6 +2543,7 @@ nat44_ed_not_translate_output_feature (snat_main_t * sm, ip4_header_t * ip, clib_bihash_kv_16_8_t kv, value; snat_main_per_thread_data_t *tsm = &sm->per_thread_data[thread_index]; snat_interface_t *i; + snat_session_t *s; /* src NAT check */ make_ed_kv (&kv, &ip->src_address, &ip->dst_address, proto, @@ -2555,6 +2556,10 @@ nat44_ed_not_translate_output_feature (snat_main_t * sm, ip4_header_t * ip, sm->inside_fib_index, dst_port, src_port); if (!clib_bihash_search_16_8 (&tsm->in2out_ed, &kv, &value)) { + s = pool_elt_at_index (tsm->sessions, value.value); + if (is_fwd_bypass_session (s)) + return 0; + /* hairpinning */ pool_foreach (i, sm->output_feature_interfaces, ({ -- cgit 1.2.3-korg