From 5010110d494c1877534340fdfddd2a5afc3b95df Mon Sep 17 00:00:00 2001 From: Xiao Liang Date: Thu, 17 Jun 2021 12:33:59 +0800 Subject: [PATCH] bgpd: Force process networks on VRF creation Force the processing of existing network configurations when VRF is created, otherwise will be skipped in bgp_static_update(). Signed-off-by: Xiao Liang (cherry picked from commit 47fc62610cc6c4228e7775b531e1a3281b98107a) --- bgpd/bgp_route.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index 366a53e26c..e35a5fff6e 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -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 -- 2.39.5