aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFilip Varga <fivarga@cisco.com>2021-03-23 12:10:55 +0100
committerOle Tr�an <otroan@employees.org>2021-03-31 11:46:42 +0000
commit8f76064716f46b716b4900154c7ac8e110c65ae6 (patch)
tree1352124cc523870e9f57871bc892749ef6fd87fd
parented2ee5e57b0f65ac4a94aac84cb6c27468878ea4 (diff)
nat: NAT44-ED unused value removal
Type: fix Coverity scan issue fix. Change-Id: I9036fade15fd381da9c1e6b575f250fdcb21f876 Signed-off-by: Filip Varga <fivarga@cisco.com>
-rw-r--r--src/plugins/nat/nat44-ed/nat44_ed.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/plugins/nat/nat44-ed/nat44_ed.c b/src/plugins/nat/nat44-ed/nat44_ed.c
index c01a2454e0f..dc784d9ee92 100644
--- a/src/plugins/nat/nat44-ed/nat44_ed.c
+++ b/src/plugins/nat/nat44-ed/nat44_ed.c
@@ -2604,7 +2604,6 @@ nat44_ed_get_out2in_worker_index (vlib_buffer_t *b, ip4_header_t *ip,
snat_main_per_thread_data_t *tsm;
u32 proto, next_worker_index = 0;
- udp_header_t *udp;
u16 port;
snat_static_mapping_t *m;
u32 hash;
@@ -2613,8 +2612,6 @@ nat44_ed_get_out2in_worker_index (vlib_buffer_t *b, ip4_header_t *ip,
if (PREDICT_TRUE (proto == NAT_PROTOCOL_UDP || proto == NAT_PROTOCOL_TCP))
{
- udp = ip4_next_header (ip);
-
init_ed_k (&kv16, ip->dst_address, vnet_buffer (b)->ip.reass.l4_dst_port,
ip->src_address, vnet_buffer (b)->ip.reass.l4_src_port,
rx_fib_index, ip->protocol);
@@ -2683,11 +2680,11 @@ nat44_ed_get_out2in_worker_index (vlib_buffer_t *b, ip4_header_t *ip,
goto done;
}
- udp = ip4_next_header (ip);
port = vnet_buffer (b)->ip.reass.l4_dst_port;
if (PREDICT_FALSE (ip->protocol == IP_PROTOCOL_ICMP))
{
+ udp_header_t *udp = ip4_next_header (ip);
icmp46_header_t *icmp = (icmp46_header_t *) udp;
icmp_echo_header_t *echo = (icmp_echo_header_t *) (icmp + 1);
if (!icmp_type_is_error_message