diff options
| author | Donald Sharp <sharpd@nvidia.com> | 2024-10-25 21:21:32 -0400 |
|---|---|---|
| committer | Donald Sharp <sharpd@nvidia.com> | 2024-10-28 14:10:06 -0400 |
| commit | aff8eaa4a2dec64a66ea7349dfffac1b0dac2820 (patch) | |
| tree | 32435225dc863ce4bdcc1faa4a907e096a1972de /sharpd/sharp_zebra.c | |
| parent | ea0b8a0364bdb37679064b680347d7276c03ca06 (diff) | |
sharpd: Allow sharpd to watch nexthops in the mrib
Nothing special here, just allow sharpd to ask to watch
nexthops in the mrib.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'sharpd/sharp_zebra.c')
| -rw-r--r-- | sharpd/sharp_zebra.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sharpd/sharp_zebra.c b/sharpd/sharp_zebra.c index 1048436b43..4447b69bf6 100644 --- a/sharpd/sharp_zebra.c +++ b/sharpd/sharp_zebra.c @@ -618,18 +618,19 @@ void nhg_del(uint32_t id) zclient_nhg_send(zclient, ZEBRA_NHG_DEL, &api_nhg); } -void sharp_zebra_nexthop_watch(struct prefix *p, vrf_id_t vrf_id, bool import, - bool watch, bool connected) +void sharp_zebra_nexthop_watch(struct prefix *p, vrf_id_t vrf_id, bool import, bool watch, + bool connected, bool mrib) { - int command; + int command = ZEBRA_NEXTHOP_REGISTER; + safi_t safi = mrib ? SAFI_MULTICAST : SAFI_UNICAST; command = ZEBRA_NEXTHOP_REGISTER; if (!watch) command = ZEBRA_NEXTHOP_UNREGISTER; - if (zclient_send_rnh(zclient, command, p, SAFI_UNICAST, connected, - false, vrf_id) == ZCLIENT_SEND_FAILURE) + if (zclient_send_rnh(zclient, command, p, safi, connected, false, vrf_id) == + ZCLIENT_SEND_FAILURE) zlog_warn("%s: Failure to send nexthop to zebra", __func__); } |
