diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2018-02-13 21:34:07 -0500 |
|---|---|---|
| committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2018-02-23 14:45:57 -0500 |
| commit | 7a1eb44b301236d81de8ba5bde6be62e496f44bc (patch) | |
| tree | 90522351e9f39a04260f1dce0638f32e287d3cfb /lib/zclient.c | |
| parent | 28610f7e444dbb2ea4175582f84e566a6645927b (diff) | |
lib: Fix notify_owner decode
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>
Diffstat (limited to 'lib/zclient.c')
| -rw-r--r-- | lib/zclient.c | 8 |
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; |
