diff --git a/lib/zclient.c b/lib/zclient.c index cde2f5e052..2e65e3c9f7 100644 --- a/lib/zclient.c +++ b/lib/zclient.c @@ -1486,10 +1486,10 @@ int zapi_pbr_rule_encode(uint8_t cmd, struct stream *s, struct pbr_rule *zrule) bool zapi_nhg_notify_decode(struct stream *s, uint32_t *id, enum zapi_nhg_notify_owner *note) { - uint16_t read_id; + uint32_t read_id; - STREAM_GETL(s, read_id); STREAM_GET(note, s, sizeof(*note)); + STREAM_GETL(s, read_id); *id = read_id; diff --git a/zebra/zapi_msg.c b/zebra/zapi_msg.c index c8220af81e..21f40ce7c2 100644 --- a/zebra/zapi_msg.c +++ b/zebra/zapi_msg.c @@ -712,7 +712,7 @@ static int zsend_ipv4_nexthop_lookup_mrib(struct zserv *client, return zserv_send_message(client, s); } -static int nhg_notify(uint16_t type, uint16_t instance, uint16_t id, +static int nhg_notify(uint16_t type, uint16_t instance, uint32_t id, enum zapi_nhg_notify_owner note) { struct zserv *client; @@ -732,8 +732,8 @@ static int nhg_notify(uint16_t type, uint16_t instance, uint16_t id, zclient_create_header(s, ZEBRA_NHG_NOTIFY_OWNER, VRF_DEFAULT); - stream_putw(s, id); stream_put(s, ¬e, sizeof(note)); + stream_putl(s, id); stream_putw_at(s, 0, stream_get_endp(s));