mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-15 09:20:25 +00:00
lib,zebra: fixup NHG notify zapi messaging
Make the message parameters align better with other zapi notifications and change the ID to correctly be a uint32. Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
This commit is contained in:
parent
27805e74f0
commit
2c7819b9d4
@ -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,
|
bool zapi_nhg_notify_decode(struct stream *s, uint32_t *id,
|
||||||
enum zapi_nhg_notify_owner *note)
|
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_GET(note, s, sizeof(*note));
|
||||||
|
STREAM_GETL(s, read_id);
|
||||||
|
|
||||||
*id = read_id;
|
*id = read_id;
|
||||||
|
|
||||||
|
@ -712,7 +712,7 @@ static int zsend_ipv4_nexthop_lookup_mrib(struct zserv *client,
|
|||||||
return zserv_send_message(client, s);
|
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)
|
enum zapi_nhg_notify_owner note)
|
||||||
{
|
{
|
||||||
struct zserv *client;
|
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);
|
zclient_create_header(s, ZEBRA_NHG_NOTIFY_OWNER, VRF_DEFAULT);
|
||||||
|
|
||||||
stream_putw(s, id);
|
|
||||||
stream_put(s, ¬e, sizeof(note));
|
stream_put(s, ¬e, sizeof(note));
|
||||||
|
stream_putl(s, id);
|
||||||
|
|
||||||
stream_putw_at(s, 0, stream_get_endp(s));
|
stream_putw_at(s, 0, stream_get_endp(s));
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user