]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Merge commit '54430df9' into thread-next
authorMaria Matejka <mq@ucw.cz>
Mon, 7 Nov 2022 09:09:01 +0000 (10:09 +0100)
committerMaria Matejka <mq@ucw.cz>
Mon, 7 Nov 2022 09:09:01 +0000 (10:09 +0100)
1  2 
nest/proto.c
proto/bgp/attrs.c
proto/bgp/bgp.c
proto/bgp/bgp.h
proto/bgp/packets.c
proto/rpki/rpki.c

diff --cc nest/proto.c
index 28b4426d84473ec5dfaccad6618306ebe5d96c03,60a749643f932b1a32837647e3d7ff1bc61e732e..90b4db39b613d3544af3e00fc4ed0b056a080235
@@@ -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 */
index bfdd9ac51e7bf0afbabd825ae580936c8e909fe6,1e234b163e77fad7d361b956bb9778977c54b49a..a0d2f4d64282e63f32242b5695df80b0f513896c
@@@ -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 8bacebfc278a547a7f97dd53e699f3c03a6f9d3c,e1e0d796815a582d8c140b96213de93066f2aa44..f8655d476e62959942393a098c5737916887adec
@@@ -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;
  
 -  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);
+   /* Ignore non-BGP channels */
+   if (C->channel != &channel_bgp)
+     return;
 +  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;
diff --cc proto/bgp/bgp.h
Simple merge
Simple merge
Simple merge