summaryrefslogtreecommitdiffstats
path: root/sharpd
diff options
context:
space:
mode:
Diffstat (limited to 'sharpd')
-rw-r--r--sharpd/sharp_zebra.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sharpd/sharp_zebra.c b/sharpd/sharp_zebra.c
index 133da918f..1048436b4 100644
--- a/sharpd/sharp_zebra.c
+++ b/sharpd/sharp_zebra.c
@@ -247,12 +247,12 @@ static bool route_add(const struct prefix *p, vrf_id_t vrf_id, uint8_t instance,
memcpy(&api.prefix, p, sizeof(*p));
api.flags = flags;
- SET_FLAG(api.message, ZAPI_MESSAGE_NEXTHOP);
/* Only send via ID if nhgroup has been successfully installed */
if (nhgid && sharp_nhgroup_id_is_installed(nhgid)) {
zapi_route_set_nhg_id(&api, &nhgid);
} else {
+ SET_FLAG(api.message, ZAPI_MESSAGE_NEXTHOP);
for (ALL_NEXTHOPS_PTR(nhg, nh)) {
/* Check if we set a VNI label */
if (nh->nh_label &&