From: Maria Matejka Date: Mon, 7 Nov 2022 09:09:01 +0000 (+0100) Subject: Merge commit '54430df9' into thread-next X-Git-Tag: v3.0-alpha1~82 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=34e803c6c32032cffeb9bd230d0f85861acd9222;p=thirdparty%2Fbird.git Merge commit '54430df9' into thread-next --- 34e803c6c32032cffeb9bd230d0f85861acd9222 diff --cc nest/proto.c index 28b4426d8,60a749643..90b4db39b --- a/nest/proto.c +++ b/nest/proto.c @@@ -985,13 -829,11 +985,16 @@@ static int reconfigure_type; /* Hack t int channel_reconfigure(struct channel *c, struct channel_config *cf) { + /* Touched by reconfiguration */ + c->stale = 0; + /* FIXME: better handle these changes, also handle in_keep_filtered */ - if ((c->table != cf->table->table) || (cf->ra_mode && (c->ra_mode != cf->ra_mode))) + if ((c->table != cf->table->table) || + (cf->ra_mode && (c->ra_mode != cf->ra_mode)) || + (cf->in_keep != c->in_keep) || + cf->out_subprefix && c->out_subprefix && + !net_equal(cf->out_subprefix, c->out_subprefix) || + (!cf->out_subprefix != !c->out_subprefix)) return 0; /* Note that filter_same() requires arguments in (new, old) order */ diff --cc proto/bgp/attrs.c index bfdd9ac51,1e234b163..a0d2f4d64 --- a/proto/bgp/attrs.c +++ b/proto/bgp/attrs.c @@@ -2021,10 -1720,15 +2021,14 @@@ bgp_setup_out_table(struct bgp_channel int bgp_preexport(struct channel *C, rte *e) { - struct proto *SRC = e->src->proto; struct bgp_proto *p = (struct bgp_proto *) C->proto; - struct bgp_proto *src = (SRC->proto == &proto_bgp) ? (struct bgp_proto *) SRC : NULL; + struct bgp_proto *src = bgp_rte_proto(e); struct bgp_channel *c = (struct bgp_channel *) C; + /* Ignore non-BGP channels */ + if (C->channel != &channel_bgp) + return -1; + /* Reject our routes */ if (src == p) return -1; @@@ -2230,11 -1923,16 +2234,15 @@@ bgp_rt_notify(struct proto *P, struct c struct bgp_proto *p = (void *) P; struct bgp_channel *c = (void *) C; struct bgp_bucket *buck; - struct bgp_prefix *px; - u32 path; + struct rte_src *path; + /* Ignore non-BGP channels */ + if (C->channel != &channel_bgp) + return; + if (new) { - struct ea_list *attrs = bgp_update_attrs(p, c, new, new->attrs->eattrs, tmp_linpool); + struct ea_list *attrs = bgp_update_attrs(p, c, new, new->attrs, tmp_linpool); /* Error during attribute processing */ if (!attrs) diff --cc proto/bgp/bgp.c index 8bacebfc2,e1e0d7968..f8655d476 --- a/proto/bgp/bgp.c +++ b/proto/bgp/bgp.c @@@ -1447,8 -1394,16 +1447,12 @@@ bgp_reload_routes(struct channel *C struct bgp_proto *p = (void *) C->proto; struct bgp_channel *c = (void *) C; + /* Ignore non-BGP channels */ + if (C->channel != &channel_bgp) + return; + - ASSERT(p->conn && (p->route_refresh || c->c.in_table)); - - if (c->c.in_table) - channel_schedule_reload(C); - else - bgp_schedule_packet(p->conn, c, PKT_ROUTE_REFRESH); + ASSERT(p->conn && p->route_refresh); + bgp_schedule_packet(p->conn, c, PKT_ROUTE_REFRESH); } static void @@@ -1488,12 -1441,10 +1496,16 @@@ bgp_feed_end(struct channel *C struct bgp_proto *p = (void *) C->proto; struct bgp_channel *c = (void *) C; + /* Ignore non-BGP channels */ + if (C->channel != &channel_bgp) + return; + + if (c->feed_out_table) + { + c->feed_out_table = 0; + return; + } + /* This should not happen */ if (!p->conn) return;