]> git.puffer.fish Git - mirror/frr.git/commitdiff
lib: Fix notify_owner decode
authorDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 14 Feb 2018 02:34:07 +0000 (21:34 -0500)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 23 Feb 2018 19:45:57 +0000 (14:45 -0500)
The notification of the owner was not properly decoding
the prefix and as such we were not properly reading the
table it was installed into.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
lib/zclient.c

index fc4d37458c0a290793f12302f787ccf33a835675..d6a6cee731b0c9ff1c7e66da26324c17f471499b 100644 (file)
@@ -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;