Skip to content

Commit

Permalink
zebra: add support for redistributed routes with nexthop groups
Browse files Browse the repository at this point in the history
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
  • Loading branch information
pguibert6WIND committed Jan 4, 2024
1 parent a7cef7b commit da3f800
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions zebra/zapi_msg.c
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,16 @@ static int zsend_redistribute_route_nhg(const struct nexthop_group *nhg,
struct nexthop *nexthop;
struct zapi_nexthop *api_nh;
int count = 0;
struct nexthop_group_id *nhgid;

if (CHECK_FLAG(nhg->flags, NEXTHOP_GROUP_TYPE_GROUP)) {
for (nhgid = nhg->group; nhgid; nhgid = nhgid->next) {
if (nhgid->nhg)
count += zsend_redistribute_route_nhg(nhgid->nhg,
api);
}
return count;
}
for (nexthop = nhg->nexthop; nexthop; nexthop = nexthop->next) {
if (!CHECK_FLAG(nexthop->flags, NEXTHOP_FLAG_ACTIVE))
continue;
Expand Down

0 comments on commit da3f800

Please sign in to comment.