diff --git a/nest/proto.c b/nest/proto.c index 50f302a9..4b8fef03 100644 --- a/nest/proto.c +++ b/nest/proto.c @@ -46,7 +46,6 @@ static char *c_states[] = { "DOWN", "START", "UP", "STOP", "RESTART" }; extern struct protocol proto_unix_iface; -static void channel_request_reload(struct channel *c); static void proto_rethink_goal(struct proto *p); static char *proto_state_name(struct proto *p); static void channel_init_limit(struct channel *c, struct limit *l, int dir, struct channel_limit *cf); @@ -1237,7 +1236,7 @@ channel_import_request_done_dynamic(struct channel_import_request *req) mb_free(req); } -static void +void channel_request_reload(struct channel *c) { ASSERT(c->in_req.hook); diff --git a/nest/protocol.h b/nest/protocol.h index bcd54bdc..f3bf6b46 100644 --- a/nest/protocol.h +++ b/nest/protocol.h @@ -742,6 +742,8 @@ static inline void channel_net_mark_refed(struct channel *c, const net_addr *n) trie_add_prefix(c->refeed_trie, n, n->pxlen, n->pxlen); } +void channel_request_reload(struct channel *c); + void *channel_config_new(const struct channel_class *cc, const char *name, uint net_type, struct proto_config *proto); void *channel_config_get(const struct channel_class *cc, const char *name, uint net_type, struct proto_config *proto); int channel_reconfigure(struct channel *c, struct channel_config *cf); diff --git a/proto/bgp/bgp.c b/proto/bgp/bgp.c index c93c553f..24b952d9 100644 --- a/proto/bgp/bgp.c +++ b/proto/bgp/bgp.c @@ -1592,6 +1592,18 @@ bgp_reload_routes(struct channel *C, struct channel_import_request *cir) 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->cf->import_table)) + channel_request_reload(&c->c); + + /* Ignoring CIR, reloading always everything */ + cir->done(cir); + return 1; + } + /* Ignore non-BGP channels */ if (C->class != &channel_bgp) { diff --git a/proto/l3vpn/l3vpn.c b/proto/l3vpn/l3vpn.c index 7b3d86d2..eace62d0 100644 --- a/proto/l3vpn/l3vpn.c +++ b/proto/l3vpn/l3vpn.c @@ -298,7 +298,10 @@ l3vpn_reload_routes(struct channel *C, struct channel_import_request *cir) break; case NET_MPLS: - /* FIXME */ + /* MPLS doesn't support partial refeed, always do a full one. */ + channel_request_feeding_dynamic(p->ip4_channel, CFRT_DIRECT); + channel_request_feeding_dynamic(p->ip6_channel, CFRT_DIRECT); + cir->done(cir); return 1; }