diff options
author | fangtong <fangtong2007@163.com> | 2021-07-24 14:55:02 +0800 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2021-08-31 21:06:17 +0000 |
commit | 33b18d40c77875ebd4bf807e668bda6479904936 (patch) | |
tree | f00661223ca49acc4c33684be02cbe7b7884aa72 /src | |
parent | 29dc67b5cbc96c988d6f859728ee040ff4991cf4 (diff) |
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 <fangtong2007@163.com>
Change-Id: I7106b2aed7a1fc17f74bf6cb513912af97584f45
Diffstat (limited to 'src')
-rw-r--r-- | src/vlib/node_funcs.h | 2 |
1 files changed, 1 insertions, 1 deletions
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); |