]> git.puffer.fish Git - matthieu/frr.git/commitdiff
bgpd: Force process networks on VRF creation
authorXiao Liang <shaw.leon@gmail.com>
Thu, 17 Jun 2021 04:33:59 +0000 (12:33 +0800)
committerXiao Liang <shaw.leon@gmail.com>
Sat, 19 Jun 2021 07:32:17 +0000 (15:32 +0800)
Force the processing of existing network configurations when VRF is
created, otherwise will be skipped in bgp_static_update().

Signed-off-by: Xiao Liang <shaw.leon@gmail.com>
bgpd/bgp_route.c

index 959a87d58378171660768ee2a71653b9574afaba..cf651185ab7aa1a6107d5d8298e69a6b18cfb565 100644 (file)
@@ -6182,6 +6182,7 @@ void bgp_static_add(struct bgp *bgp)
        struct bgp_table *table;
        struct bgp_static *bgp_static;
 
+       SET_FLAG(bgp->flags, BGP_FLAG_FORCE_STATIC_PROCESS);
        FOREACH_AFI_SAFI (afi, safi)
                for (dest = bgp_table_top(bgp->route[afi][safi]); dest;
                     dest = bgp_route_next(dest)) {
@@ -6208,6 +6209,7 @@ void bgp_static_add(struct bgp *bgp)
                                        safi);
                        }
                }
+       UNSET_FLAG(bgp->flags, BGP_FLAG_FORCE_STATIC_PROCESS);
 }
 
 /* Called from bgp_delete().  Delete all static routes from the BGP