diff options
author | Klement Sekera <ksekera@cisco.com> | 2020-10-30 16:17:00 +0000 |
---|---|---|
committer | Matthew Smith <mgsmith@netgate.com> | 2020-11-05 18:53:50 +0000 |
commit | a94e26db701417ec6955997aea6b93e8bd87c032 (patch) | |
tree | 5dd56742c894e5cab2621e27ee20626169fb85ba /src/plugins/nat/out2in_ed.c | |
parent | bd50ed18de83493b119e67897a5fa9ba9c7e763e (diff) |
nat: remove unnecessary code
Type: improvement
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: I478f5dcbf7595c62611d25a40aa356d8ce09d216
Diffstat (limited to 'src/plugins/nat/out2in_ed.c')
-rw-r--r-- | src/plugins/nat/out2in_ed.c | 33 |
1 files changed, 19 insertions, 14 deletions
diff --git a/src/plugins/nat/out2in_ed.c b/src/plugins/nat/out2in_ed.c index 703c854834c..2f515d0f2f4 100644 --- a/src/plugins/nat/out2in_ed.c +++ b/src/plugins/nat/out2in_ed.c @@ -502,10 +502,9 @@ create_bypass_for_fwd (snat_main_t * sm, vlib_buffer_t * b, ip4_header_t * ip, if (ip->protocol == IP_PROTOCOL_TCP) { tcp_header_t *tcp = ip4_next_header (ip); - if (nat44_set_tcp_session_state_o2i - (sm, now, s, tcp->flags, tcp->ack_number, tcp->seq_number, - thread_index)) - return; + nat44_set_tcp_session_state_o2i (sm, now, s, tcp->flags, + tcp->ack_number, tcp->seq_number, + thread_index); } /* Accounting */ @@ -969,11 +968,14 @@ nat44_ed_out2in_fast_path_node_fn_inline (vlib_main_t * vm, } vlib_increment_simple_counter (&sm->counters.fastpath.out2in_ed.tcp, thread_index, sw_if_index0, 1); - if (nat44_set_tcp_session_state_o2i - (sm, now, s0, vnet_buffer (b0)->ip.reass.icmp_type_or_tcp_flags, - vnet_buffer (b0)->ip.reass.tcp_ack_number, - vnet_buffer (b0)->ip.reass.tcp_seq_number, thread_index)) - goto trace0; + nat44_set_tcp_session_state_o2i (sm, now, s0, + vnet_buffer (b0)->ip. + reass.icmp_type_or_tcp_flags, + vnet_buffer (b0)->ip. + reass.tcp_ack_number, + vnet_buffer (b0)->ip. + reass.tcp_seq_number, + thread_index); } else if (!vnet_buffer (b0)->ip.reass.is_non_first_fragment && udp0->checksum) @@ -1291,11 +1293,14 @@ nat44_ed_out2in_slow_path_node_fn_inline (vlib_main_t * vm, } vlib_increment_simple_counter (&sm->counters.slowpath.out2in_ed.tcp, thread_index, sw_if_index0, 1); - if (nat44_set_tcp_session_state_o2i - (sm, now, s0, vnet_buffer (b0)->ip.reass.icmp_type_or_tcp_flags, - vnet_buffer (b0)->ip.reass.tcp_ack_number, - vnet_buffer (b0)->ip.reass.tcp_seq_number, thread_index)) - goto trace0; + nat44_set_tcp_session_state_o2i (sm, now, s0, + vnet_buffer (b0)->ip. + reass.icmp_type_or_tcp_flags, + vnet_buffer (b0)->ip. + reass.tcp_ack_number, + vnet_buffer (b0)->ip. + reass.tcp_seq_number, + thread_index); } else if (!vnet_buffer (b0)->ip.reass.is_non_first_fragment && udp0->checksum) |