Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bgpd: Clear stale routes with multiple paths (backport) #17394

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions bgpd/bgp_fsm.c
Original file line number Diff line number Diff line change
Expand Up @@ -685,6 +685,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",
Expand All @@ -695,8 +700,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 {
Expand All @@ -713,6 +716,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",
Expand All @@ -723,8 +731,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;
}
}
}
Expand Down
2 changes: 0 additions & 2 deletions bgpd/bgp_route.c
Original file line number Diff line number Diff line change
Expand Up @@ -5856,7 +5856,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 {
Expand Down Expand Up @@ -5885,7 +5884,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;
}
}
}
Expand Down
Loading