From b924f033875729414d91b7efe5cd4d2003f28390 Mon Sep 17 00:00:00 2001 From: Donatas Abraitis Date: Wed, 9 Oct 2024 18:20:48 +0300 Subject: [PATCH] bgpd: Re-announce the routes if the underlay IGP metric changes 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 --- bgpd/bgp_route.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index a8ca887cdc12..93bfa62b7d12 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -3727,11 +3727,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)