Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
| inline |
side by side
classify: forbid invalid match config
[vpp.git]
/
src
/
vnet
/
classify
/
vnet_classify.c
diff --git
a/src/vnet/classify/vnet_classify.c
b/src/vnet/classify/vnet_classify.c
index
3d338d1
..
de11a10
100755
(executable)
--- a/
src/vnet/classify/vnet_classify.c
+++ b/
src/vnet/classify/vnet_classify.c
@@
-775,6
+775,9
@@
vnet_classify_add_del_table (vnet_classify_main_t * cm,
if (nbuckets == 0)
return VNET_API_ERROR_INVALID_VALUE;
+ if (match < 1 || match > 5)
+ return VNET_API_ERROR_INVALID_VALUE;
+
t = vnet_classify_new_table (cm, mask, nbuckets, memory_size,
skip, match);
t->next_table_index = next_table_index;