]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
BGP: Do not restart when next hop keep/self is changed master
authorMaria Matejka <mq@ucw.cz>
Tue, 29 Jul 2025 12:15:08 +0000 (14:15 +0200)
committerMaria Matejka <mq@ucw.cz>
Tue, 29 Jul 2025 12:15:08 +0000 (14:15 +0200)
The change in dade7147eb6b62b2d58d478a370baef513d96975 forces BGP to restart
even if next hop self and next hop keep changes, which can be updated just by
reloading export, while explicit next hop address can not.

Related to #280.

doc/bird.sgml
proto/bgp/bgp.c

index d981936afc38cd4fd4287d076f75d729cffd2849..98a480f79bdec454dd5cc8447263c943032fcaae 100644 (file)
@@ -3958,7 +3958,6 @@ direction (re-export of routes to the BGP neighbor):
 
 <itemize>
        <item><cf/export/
-       <item><cf/next hop address/
        <item><cf/next hop self/
        <item><cf/next hop keep/
        <item><cf/link local next hop format/
@@ -3995,6 +3994,7 @@ direction (re-export of routes to the BGP neighbor):
        <item><cf/graceful restart/
        <item><cf/long lived graceful restart/
        <item><cf/long lived stale time/
+       <item><cf/next hop address/
        <item><cf/extended next hop/
        <item><cf/add paths/
        <item><cf/import table/
index 5998a8482623d3329bdc70f242f66ff698ad25de..ad51e6260c57a753d01220ea3ae0e7db4541b377 100644 (file)
@@ -2858,12 +2858,12 @@ bgp_channel_reconfigure(struct channel *C, struct channel_config *CC, int *impor
   }
 
   /* Outgoing next hop setting is too complex to update, forcing restart. */
-  if (!ipa_equal(new->next_hop_addr, old->next_hop_addr) ||
-      (new->next_hop_self != old->next_hop_self) ||
-      (new->next_hop_keep != old->next_hop_keep))
+  if (!ipa_equal(new->next_hop_addr, old->next_hop_addr))
     return 0;
 
-  if ((new->llnh_format != old->llnh_format) ||
+  if ((new->next_hop_self != old->next_hop_self) ||
+      (new->next_hop_keep != old->next_hop_keep) ||
+      (new->llnh_format != old->llnh_format) ||
       (new->aigp != old->aigp) ||
       (new->aigp_originate != old->aigp_originate))
     *export_changed = 1;