Skip to content

Commit

Permalink
Merge pull request #16346 from pguibert6WIND/sharp_zapi_nexthop_only
Browse files Browse the repository at this point in the history
sharpd: fix set ZAPI_MESSAGE_NEXTHOP in nhg only when nexthops used
  • Loading branch information
donaldsharp authored Jul 5, 2024
2 parents e94fc4e + 7f2a911 commit d7d4915
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sharpd/sharp_zebra.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 &&
Expand Down

0 comments on commit d7d4915

Please sign in to comment.