summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@cumulusnetworks.com>2020-01-03 17:49:01 -0500
committerQuentin Young <qlyoung@cumulusnetworks.com>2020-01-22 14:12:15 -0500
commit663d3a9115b55e4fd9c8d3b0ce3adb25248c40dd (patch)
treef561817a434e08c7108883af0692282d8c865213
parentd35e556c84d775989ba606457da6093c74b1bd3f (diff)
zebra: check afi validity in vrf label message
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
-rw-r--r--zebra/zapi_msg.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/zebra/zapi_msg.c b/zebra/zapi_msg.c
index db54e6f25b..0ac17a0f4a 100644
--- a/zebra/zapi_msg.c
+++ b/zebra/zapi_msg.c
@@ -2272,6 +2272,12 @@ static void zread_vrf_label(ZAPI_HANDLER_ARGS)
s = msg;
STREAM_GETL(s, nlabel);
STREAM_GETC(s, afi);
+
+ if (!(IS_VALID_AFI(afi))) {
+ zlog_warn("Invalid AFI for VRF label: %u", afi);
+ return;
+ }
+
if (nlabel == zvrf->label[afi]) {
/*
* Nothing to do here move along