Skip to content

Commit

Permalink
bgpd: Re-announce the routes if the underlay IGP metric changes
Browse files Browse the repository at this point in the history
If the underlay IGP metric changes, we SHOULD re-announce the routes with the
correct bpi->extra->igpmetric set.

Without this patch if the IGP link cost (metric) changes, we never notice this
and the peers do not have the updated metrics, which in turn causes incorrect
best path selections on remote peers.

Signed-off-by: Donatas Abraitis <[email protected]>
  • Loading branch information
ton31337 committed Oct 9, 2024
1 parent 07d48af commit 5416bfb
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions bgpd/bgp_route.c
Original file line number Diff line number Diff line change
Expand Up @@ -3722,11 +3722,10 @@ static void bgp_process_main_one(struct bgp *bgp, struct bgp_dest *dest,

/* If there is a change of interest to peers, reannounce the
* route. */
if (CHECK_FLAG(old_select->flags, BGP_PATH_ATTR_CHANGED)
|| CHECK_FLAG(old_select->flags, BGP_PATH_LINK_BW_CHG)
|| CHECK_FLAG(dest->flags, BGP_NODE_LABEL_CHANGED)) {
if (CHECK_FLAG(old_select->flags, BGP_PATH_ATTR_CHANGED) ||
CHECK_FLAG(dest->flags, BGP_NODE_LABEL_CHANGED) ||
bgp_zebra_has_route_changed(old_select)) {
group_announce_route(bgp, afi, safi, dest, new_select);

/* unicast routes must also be annouced to
* labeled-unicast update-groups */
if (safi == SAFI_UNICAST)
Expand Down

0 comments on commit 5416bfb

Please sign in to comment.