]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Merge commit 'v2.14-92-gf27b05de' into thread-next
authorMaria Matejka <mq@ucw.cz>
Sun, 28 Jan 2024 14:00:59 +0000 (15:00 +0100)
committerMaria Matejka <mq@ucw.cz>
Sun, 28 Jan 2024 14:00:59 +0000 (15:00 +0100)
1  2 
doc/bird.sgml
proto/bgp/bgp.c
proto/bgp/bgp.h
proto/bgp/config.Y
proto/bgp/packets.c

diff --cc doc/bird.sgml
Simple merge
diff --cc proto/bgp/bgp.c
index dd47eb600d7000f9c93180f9f2bb0e91e5234dc2,b14df932fb40b0f043046233bdcb1b91a79babaf..9de97181afea788180f334e74cbf40c4c50f167c
@@@ -2378,17 -2188,30 +2399,28 @@@ bgp_reconfigure(struct proto *P, struc
      if (C->stale)
        same = proto_configure_channel(P, &C, NULL) && same;
  
-   if (same && (p->start_state > BSS_PREPARE))
-     bgp_update_bfd(p, new->bfd);
+   /* Reset name counter */
+   p->dynamic_name_counter = 0;
+   if (!same)
+     return 0;
  
    /* We should update our copy of configuration ptr as old configuration will be freed */
-   if (same)
-     p->cf = new;
+   p->cf = new;
  
-   /* Reset name counter */
-   p->dynamic_name_counter = 0;
+   /* Check whether existing connections are compatible with required capabilities */
+   struct bgp_conn *ci = &p->incoming_conn;
+   if (((ci->state == BS_OPENCONFIRM) || (ci->state == BS_ESTABLISHED)) && !bgp_check_capabilities(ci))
+     return 0;
+   struct bgp_conn *co = &p->outgoing_conn;
+   if (((co->state == BS_OPENCONFIRM) || (co->state == BS_ESTABLISHED)) && !bgp_check_capabilities(co))
+     return 0;
  
-   return same;
 -  proto_setup_mpls_map(P, RTS_BGP, 1);
 -
+   if (p->start_state > BSS_PREPARE)
+     bgp_update_bfd(p, new->bfd);
+   return 1;
  }
  
  #define TABLE(cf, NAME) ((cf)->NAME ? (cf)->NAME->table : NULL )
diff --cc proto/bgp/bgp.h
Simple merge
Simple merge
Simple merge