Code Review
/
vpp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
|
patch
| inline |
side by side
(parent:
cd837bd
)
l2: fix segment fault
22/42322/1
author
fenglei
<
[email protected]
>
Thu, 9 Jan 2025 09:32:35 +0000
(17:32 +0800)
committer
Dave Wallace
<
[email protected]
>
Wed, 5 Feb 2025 16:53:14 +0000
(16:53 +0000)
if feature_bitmap is zero, it will make feat_bitmap_get_next_node_index function generate segment fault
Type: fix
Change-Id: I6a9c0b29d927e600537e9e43ad696d09c091f9b1
Signed-off-by: fenglei <
[email protected]
>
(cherry picked from commit
03c21e0700ba59ca4bb8e81bdb18779f35a1845a
)
src/vnet/l2/l2_input_node.c
patch
|
blob
|
history
diff --git
a/src/vnet/l2/l2_input_node.c
b/src/vnet/l2/l2_input_node.c
index
76b9480
..
58a5417
100644
(file)
--- a/
src/vnet/l2/l2_input_node.c
+++ b/
src/vnet/l2/l2_input_node.c
@@
-215,7
+215,10
@@
classify_and_dispatch (l2input_main_t * msm, vlib_buffer_t * b0, u16 * next0)
vnet_buffer (b0)->sw_if_index[VLIB_TX] = config->output_sw_if_index;
}
else
- feat_mask = L2INPUT_FEAT_DROP;
+ {
+ *next0 = L2INPUT_NEXT_DROP;
+ return;
+ }
/* mask out features from bitmap using packet type and bd config */
u32 feature_bitmap = config->feature_bitmap & feat_mask;