diff options
author | Philippe Guibert <philippe.guibert@6wind.com> | 2023-12-12 21:04:49 +0100 |
---|---|---|
committer | Philippe Guibert <philippe.guibert@6wind.com> | 2023-12-18 10:08:45 +0100 |
commit | d8477d4bb534e37121c08b358fd923c703540ae0 (patch) | |
tree | 81867837d754387a3348f8602622b120ba3dba3b /sharpd | |
parent | bgpd: rework bgp_zebra_announce() function, separate nexthop handling (diff) | |
download | frr-d8477d4bb534e37121c08b358fd923c703540ae0.tar.xz frr-d8477d4bb534e37121c08b358fd923c703540ae0.zip |
bgpd, lib: add zapi_route_set_nhg_id() support
There is no function that both sets the nhg id, and sets
the ZAPI_MESSAGE_NHG flag if the nhg id is valid.
Create a ZAPI API to do this, and apply the changes wherever
needed.
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Diffstat (limited to 'sharpd')
-rw-r--r-- | sharpd/sharp_zebra.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sharpd/sharp_zebra.c b/sharpd/sharp_zebra.c index ff4895189..cbfa0d1cc 100644 --- a/sharpd/sharp_zebra.c +++ b/sharpd/sharp_zebra.c @@ -251,8 +251,7 @@ static bool route_add(const struct prefix *p, vrf_id_t vrf_id, uint8_t instance, /* Only send via ID if nhgroup has been successfully installed */ if (nhgid && sharp_nhgroup_id_is_installed(nhgid)) { - SET_FLAG(api.message, ZAPI_MESSAGE_NHG); - api.nhgid = nhgid; + zapi_route_set_nhg_id(&api, &nhgid); } else { for (ALL_NEXTHOPS_PTR(nhg, nh)) { /* Check if we set a VNI label */ |