summaryrefslogtreecommitdiff
path: root/proto/bgp
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2023-09-30 23:18:04 +0200
committerOndrej Zajicek <santiago@crfreenet.org>2023-10-04 13:12:05 +0200
commitd8130da86bda6244e1f5c06eb9b9033625b781e6 (patch)
tree419db3b2a127896dfc54251cb5017310c3d86036 /proto/bgp
parenta7a9df8639c701dd020cf61d19b205230742a17e (diff)
BGP, L3VPN: Fix MPLS channel reload
When a MPLS channel is reloaded, it should reload all regular MPLS-aware channels. This causes re-evaluation of routes in FEC map and possibly reannouncement of MPLS routes.
Diffstat (limited to 'proto/bgp')
-rw-r--r--proto/bgp/bgp.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/proto/bgp/bgp.c b/proto/bgp/bgp.c
index 4651b76a..f8146bdf 100644
--- a/proto/bgp/bgp.c
+++ b/proto/bgp/bgp.c
@@ -1414,6 +1414,16 @@ bgp_reload_routes(struct channel *C)
struct bgp_proto *p = (void *) C->proto;
struct bgp_channel *c = (void *) C;
+ /* For MPLS channel, reload all MPLS-aware channels */
+ if (C == p->p.mpls_channel)
+ {
+ BGP_WALK_CHANNELS(p, c)
+ if ((c->desc->mpls) && (p->route_refresh || c->c.in_table))
+ bgp_reload_routes(&c->c);
+
+ return;
+ }
+
/* Ignore non-BGP channels */
if (C->channel != &channel_bgp)
return;