Merge branch 'mq-aggregator-for-v3' into thread-next

This commit is contained in:
Maria Matejka 2023-11-09 16:53:34 +01:00
commit 219dc0fdb5
4 changed files with 19 additions and 3 deletions

View File

@ -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);

View File

@ -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);

View File

@ -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)
{

View File

@ -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;
}