Skip to content

Commit

Permalink
bgpd: fix do not use api.backup_nexthop in ZAPI message
Browse files Browse the repository at this point in the history
The backup_nexthop entry list has been populated by mistake,
and should not. Fix this by reverting the introduced behavior.

Fixes: 237ebf8 ("bgpd: rework bgp_zebra_announce() function, separate nexthop handling")

Signed-off-by: Philippe Guibert <[email protected]>
  • Loading branch information
pguibert6WIND committed Jun 20, 2024
1 parent 34a6e22 commit d4390fc
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions bgpd/bgp_zebra.c
Original file line number Diff line number Diff line change
Expand Up @@ -1331,10 +1331,7 @@ static void bgp_zebra_announce_parse_nexthop(
&nh_weight))
continue;
}
if (CHECK_FLAG(info->flags, BGP_PATH_SELECTED))
api_nh = &api->nexthops[*valid_nh_count];
else
api_nh = &api->backup_nexthops[*valid_nh_count];
api_nh = &api->nexthops[*valid_nh_count];

api_nh->srte_color = bgp_attr_get_color(info->attr);

Expand Down

0 comments on commit d4390fc

Please sign in to comment.