From a94e26db701417ec6955997aea6b93e8bd87c032 Mon Sep 17 00:00:00 2001 From: Klement Sekera Date: Fri, 30 Oct 2020 16:17:00 +0000 Subject: nat: remove unnecessary code Type: improvement Signed-off-by: Klement Sekera Change-Id: I478f5dcbf7595c62611d25a40aa356d8ce09d216 --- src/plugins/nat/in2out_ed.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'src/plugins/nat/in2out_ed.c') diff --git a/src/plugins/nat/in2out_ed.c b/src/plugins/nat/in2out_ed.c index f0bb0f9aae7..2af0ba706fe 100644 --- a/src/plugins/nat/in2out_ed.c +++ b/src/plugins/nat/in2out_ed.c @@ -565,9 +565,7 @@ nat_not_translate_output_feature_fwd (snat_main_t * sm, ip4_header_t * ip, { if (ip->protocol == IP_PROTOCOL_TCP) { - if (nat44_set_tcp_session_state_i2o - (sm, now, s, b, thread_index)) - return 1; + nat44_set_tcp_session_state_i2o (sm, now, s, b, thread_index); } /* Accounting */ nat44_session_update_counters (s, now, @@ -1114,8 +1112,7 @@ nat44_ed_in2out_fast_path_node_fn_inline (vlib_main_t * vm, } vlib_increment_simple_counter (&sm->counters.fastpath.in2out_ed.tcp, thread_index, sw_if_index0, 1); - if (nat44_set_tcp_session_state_i2o (sm, now, s0, b0, thread_index)) - goto trace0; + nat44_set_tcp_session_state_i2o (sm, now, s0, b0, thread_index); } else if (!vnet_buffer (b0)->ip.reass.is_non_first_fragment && udp0->checksum) @@ -1400,8 +1397,7 @@ nat44_ed_in2out_slow_path_node_fn_inline (vlib_main_t * vm, } vlib_increment_simple_counter (&sm->counters.slowpath.in2out_ed.tcp, thread_index, sw_if_index0, 1); - if (nat44_set_tcp_session_state_i2o (sm, now, s0, b0, thread_index)) - goto trace0; + nat44_set_tcp_session_state_i2o (sm, now, s0, b0, thread_index); } else if (!vnet_buffer (b0)->ip.reass.is_non_first_fragment && udp0->checksum) -- cgit 1.2.3-korg