From: fangtong Date: Sat, 24 Jul 2021 06:55:02 +0000 (+0800) Subject: vlib: fixed the issue of vpp crash caused by interface up/down X-Git-Tag: v22.02-rc0~77 X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=33b18d40c77875ebd4bf807e668bda6479904936;p=vpp.git vlib: fixed the issue of vpp crash caused by interface up/down When the interface status changes, the api of vnet_hw_interface_set_flags_helper calls the event processing function (vlib_process_signal_event_helper) for event processing. When the opinter data_vec is NULL, the _ven_len operation of an illegal address will cause vpp crash. Type:fix Signed-off-by: fangtong Change-Id: I7106b2aed7a1fc17f74bf6cb513912af97584f45 --- diff --git a/src/vlib/node_funcs.h b/src/vlib/node_funcs.h index 3c90a88efa0..b1d5c7bcacb 100644 --- a/src/vlib/node_funcs.h +++ b/src/vlib/node_funcs.h @@ -848,7 +848,7 @@ vlib_process_signal_event_helper (vlib_node_main_t * nm, if (!data_vec && vec_len (nm->recycled_event_data_vectors)) { data_vec = vec_pop (nm->recycled_event_data_vectors); - _vec_len (data_vec) = 0; + vec_reset_length (data_vec); } l = vec_len (data_vec);