summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2018-03-20 18:48:12 -0400
committerDonald Sharp <sharpd@cumulusnetworks.com>2018-03-20 18:48:12 -0400
commit98a217f0d074d43b37f7e255274edd22bc202c87 (patch)
tree48bc4b76408d25cb30f02eccc8aacd6196e0e857
parentaf5849b6628695a945f70eb195c2049d1bbb3dfb (diff)
zebra: Ensure that we properly decode the zapi_route sent to us
Ensure that we have properly decoded the zapi_route sent to us and if we cannot decode, log and move on. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
-rw-r--r--zebra/zserv.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/zebra/zserv.c b/zebra/zserv.c
index fc23d4e0dd..2d68fcde87 100644
--- a/zebra/zserv.c
+++ b/zebra/zserv.c
@@ -1168,7 +1168,12 @@ static void zread_route_add(ZAPI_HANDLER_ARGS)
struct ipaddr vtep_ip;
s = msg;
- zapi_route_decode(s, &api);
+ if (zapi_route_decode(s, &api) < 0) {
+ if (IS_ZEBRA_DEBUG_RECV)
+ zlog_debug("%s: Unable to decode zapi_route sent",
+ __PRETTY_FUNCTION__);
+ return;
+ }
if (IS_ZEBRA_DEBUG_RECV) {
char buf_prefix[PREFIX_STRLEN];