Merge pull request #17392 from opensourcerouting/fix/backport_17376_10.1

bgpd: Clear stale routes with multiple paths (backport)
This commit is contained in:
Donald Sharp 2024-11-08 11:12:50 -05:00 committed by GitHub
commit 7f28c4786a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 10 additions and 6 deletions

View File

@ -687,6 +687,11 @@ static void bgp_set_llgr_stale(struct peer *peer, afi_t afi, safi_t safi)
COMMUNITY_NO_LLGR))
continue;
if (bgp_attr_get_community(pi->attr) &&
community_include(bgp_attr_get_community(pi->attr),
COMMUNITY_LLGR_STALE))
continue;
if (bgp_debug_neighbor_events(peer))
zlog_debug(
"%pBP Long-lived set stale community (LLGR_STALE) for: %pFX",
@ -697,8 +702,6 @@ static void bgp_set_llgr_stale(struct peer *peer, afi_t afi, safi_t safi)
pi->attr = bgp_attr_intern(&attr);
bgp_recalculate_afi_safi_bestpaths(
peer->bgp, afi, safi);
break;
}
}
} else {
@ -715,6 +718,11 @@ static void bgp_set_llgr_stale(struct peer *peer, afi_t afi, safi_t safi)
COMMUNITY_NO_LLGR))
continue;
if (bgp_attr_get_community(pi->attr) &&
community_include(bgp_attr_get_community(pi->attr),
COMMUNITY_LLGR_STALE))
continue;
if (bgp_debug_neighbor_events(peer))
zlog_debug(
"%pBP Long-lived set stale community (LLGR_STALE) for: %pFX",
@ -725,8 +733,6 @@ static void bgp_set_llgr_stale(struct peer *peer, afi_t afi, safi_t safi)
pi->attr = bgp_attr_intern(&attr);
bgp_recalculate_afi_safi_bestpaths(peer->bgp,
afi, safi);
break;
}
}
}

View File

@ -6214,7 +6214,6 @@ void bgp_clear_stale_route(struct peer *peer, afi_t afi, safi_t safi)
vpn_leak_to_vrf_withdraw(pi);
bgp_rib_remove(rm, pi, peer, afi, safi);
break;
}
}
} else {
@ -6243,7 +6242,6 @@ void bgp_clear_stale_route(struct peer *peer, afi_t afi, safi_t safi)
pi);
bgp_rib_remove(dest, pi, peer, afi, safi);
break;
}
}
}