summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/zclient.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/zclient.c b/lib/zclient.c
index fc4d37458c..d6a6cee731 100644
--- a/lib/zclient.c
+++ b/lib/zclient.c
@@ -1213,13 +1213,17 @@ bool zapi_route_notify_decode(struct stream *s, struct prefix *p,
uint32_t *tableid,
enum zapi_route_notify_owner *note)
{
+ uint32_t t;
+
STREAM_GET(note, s, sizeof(*note));
STREAM_GETC(s, p->family);
STREAM_GETC(s, p->prefixlen);
STREAM_GET(&p->u.prefix, s,
- PSIZE(p->prefixlen));
- STREAM_GETL(s, *tableid);
+ prefix_blen(p));
+ STREAM_GETL(s, t);
+
+ *tableid = t;
return true;