mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-07 15:33:56 +00:00
Merge pull request #13557 from anlancs/fix/bgpd-evpn-rmac-best-path
bgpd: Fix missing deletion of evpn routes
This commit is contained in:
commit
95070f2eef
@ -3319,6 +3319,9 @@ static int uninstall_evpn_route_entry_in_vrf(struct bgp *bgp_vrf,
|
|||||||
bgp_aggregate_decrement(bgp_vrf, bgp_dest_get_prefix(dest), pi, afi,
|
bgp_aggregate_decrement(bgp_vrf, bgp_dest_get_prefix(dest), pi, afi,
|
||||||
safi);
|
safi);
|
||||||
|
|
||||||
|
/* Force deletion */
|
||||||
|
SET_FLAG(dest->flags, BGP_NODE_PROCESS_CLEAR);
|
||||||
|
|
||||||
/* Mark entry for deletion */
|
/* Mark entry for deletion */
|
||||||
bgp_path_info_delete(dest, pi);
|
bgp_path_info_delete(dest, pi);
|
||||||
|
|
||||||
|
@ -3227,10 +3227,11 @@ static void bgp_process_main_one(struct bgp *bgp, struct bgp_dest *dest,
|
|||||||
/* If best route remains the same and this is not due to user-initiated
|
/* If best route remains the same and this is not due to user-initiated
|
||||||
* clear, see exactly what needs to be done.
|
* clear, see exactly what needs to be done.
|
||||||
*/
|
*/
|
||||||
if (old_select && old_select == new_select
|
if (old_select && old_select == new_select &&
|
||||||
&& !CHECK_FLAG(dest->flags, BGP_NODE_USER_CLEAR)
|
!CHECK_FLAG(dest->flags, BGP_NODE_USER_CLEAR) &&
|
||||||
&& !CHECK_FLAG(old_select->flags, BGP_PATH_ATTR_CHANGED)
|
!CHECK_FLAG(dest->flags, BGP_NODE_PROCESS_CLEAR) &&
|
||||||
&& !bgp_addpath_is_addpath_used(&bgp->tx_addpath, afi, safi)) {
|
!CHECK_FLAG(old_select->flags, BGP_PATH_ATTR_CHANGED) &&
|
||||||
|
!bgp_addpath_is_addpath_used(&bgp->tx_addpath, afi, safi)) {
|
||||||
if (bgp_zebra_has_route_changed(old_select)) {
|
if (bgp_zebra_has_route_changed(old_select)) {
|
||||||
#ifdef ENABLE_BGP_VNC
|
#ifdef ENABLE_BGP_VNC
|
||||||
vnc_import_bgp_add_route(bgp, p, old_select);
|
vnc_import_bgp_add_route(bgp, p, old_select);
|
||||||
@ -3284,6 +3285,10 @@ static void bgp_process_main_one(struct bgp *bgp, struct bgp_dest *dest,
|
|||||||
*/
|
*/
|
||||||
UNSET_FLAG(dest->flags, BGP_NODE_USER_CLEAR);
|
UNSET_FLAG(dest->flags, BGP_NODE_USER_CLEAR);
|
||||||
|
|
||||||
|
/* If the process wants to force deletion this flag will be set
|
||||||
|
*/
|
||||||
|
UNSET_FLAG(dest->flags, BGP_NODE_PROCESS_CLEAR);
|
||||||
|
|
||||||
/* bestpath has changed; bump version */
|
/* bestpath has changed; bump version */
|
||||||
if (old_select || new_select) {
|
if (old_select || new_select) {
|
||||||
bgp_bump_version(dest);
|
bgp_bump_version(dest);
|
||||||
|
@ -100,6 +100,7 @@ struct bgp_node {
|
|||||||
#define BGP_NODE_FIB_INSTALLED (1 << 6)
|
#define BGP_NODE_FIB_INSTALLED (1 << 6)
|
||||||
#define BGP_NODE_LABEL_REQUESTED (1 << 7)
|
#define BGP_NODE_LABEL_REQUESTED (1 << 7)
|
||||||
#define BGP_NODE_SOFT_RECONFIG (1 << 8)
|
#define BGP_NODE_SOFT_RECONFIG (1 << 8)
|
||||||
|
#define BGP_NODE_PROCESS_CLEAR (1 << 9)
|
||||||
|
|
||||||
struct bgp_addpath_node_data tx_addpath;
|
struct bgp_addpath_node_data tx_addpath;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user