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>
This commit is contained in:
Benoît Ganne
2022-08-29 11:56:08 +02:00
parent 8a34484057
commit f4f1b959c0

View File

@ -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;