]> 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)
committermergify-bot <noreply@mergify.io>
Fri, 23 Jul 2021 09:11:40 +0000 (09:11 +0000)
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>
(cherry picked from commit 47fc62610cc6c4228e7775b531e1a3281b98107a)

bgpd/bgp_route.c

index 366a53e26c780d19d587fc3a19df9eed6fc905f8..e35a5fff6e648d43b4f88977557790608661aea8 100644 (file)
@@ -5970,6 +5970,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)) {
@@ -5996,6 +5997,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