Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
| inline |
side by side
Enforce Bridge Domain ID range to match 24-bit VNI range
[vpp.git]
/
src
/
vnet
/
l2
/
l2_input.c
diff --git
a/src/vnet/l2/l2_input.c
b/src/vnet/l2/l2_input.c
index
41a93f5
..
aca23fe
100644
(file)
--- a/
src/vnet/l2/l2_input.c
+++ b/
src/vnet/l2/l2_input.c
@@
-791,6
+791,12
@@
int_l2_bridge (vlib_main_t * vm,
goto done;
}
+ if (bd_id > L2_BD_ID_MAX)
+ {
+ error = clib_error_return (0, "bridge domain ID exceed 16M limit",
+ format_unformat_error, input);
+ goto done;
+ }
bd_index = bd_find_or_add_bd_index (&bd_main, bd_id);
/* optional bvi */