summaryrefslogtreecommitdiffstats
path: root/src/plugins/nat
diff options
context:
space:
mode:
authorBenoît Ganne <bganne@cisco.com>2022-08-29 11:56:08 +0200
committerBenoît Ganne <bganne@cisco.com>2022-08-29 11:56:08 +0200
commitf4f1b959c070ce462846d5666d60dc5624dd271b (patch)
tree7b2ba630775b9b12437ddc1c8e81099747cf8756 /src/plugins/nat
parent8a34484057895cb583f46915274de71550ac0f2d (diff)
nat: fix coverity 249202
In case of a bad packet, the bihash kv is not initialized before being copied in the trace. Make sure it is initialized to 0. Type: fix Change-Id: I22fcfe99f3586d0fa128493059547a56557b8fb5 Signed-off-by: Benoît Ganne <bganne@cisco.com>
Diffstat (limited to 'src/plugins/nat')
-rw-r--r--src/plugins/nat/nat44-ed/nat44_ed_out2in.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/nat/nat44-ed/nat44_ed_out2in.c b/src/plugins/nat/nat44-ed/nat44_ed_out2in.c
index e53d9c5a2de..33449122e43 100644
--- a/src/plugins/nat/nat44-ed/nat44_ed_out2in.c
+++ b/src/plugins/nat/nat44-ed/nat44_ed_out2in.c
@@ -759,7 +759,7 @@ nat44_ed_out2in_fast_path_node_fn_inline (vlib_main_t * vm,
ip_protocol_t proto0;
ip4_header_t *ip0;
snat_session_t *s0 = 0;
- clib_bihash_kv_16_8_t kv0, value0;
+ clib_bihash_kv_16_8_t kv0 = {}, value0;
nat_translation_error_e translation_error = NAT_ED_TRNSL_ERR_SUCCESS;
nat_slow_path_reason_e slow_path_reason = NAT_ED_SP_REASON_NO_REASON;
nat_6t_flow_t *f = 0;
@@ -1060,7 +1060,7 @@ nat44_ed_out2in_slow_path_node_fn_inline (vlib_main_t * vm,
udp_header_t *udp0;
icmp46_header_t *icmp0;
snat_session_t *s0 = 0;
- clib_bihash_kv_16_8_t kv0, value0;
+ clib_bihash_kv_16_8_t kv0 = {}, value0;
lb_nat_type_t lb_nat0;
twice_nat_type_t twice_nat0;
u8 identity_nat0;