]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
BGP: restart on outgoing next hop setting change
authorMaria Matejka <mq@ucw.cz>
Wed, 25 Jun 2025 11:00:11 +0000 (13:00 +0200)
committerMaria Matejka <mq@ucw.cz>
Fri, 18 Jul 2025 11:05:52 +0000 (13:05 +0200)
When next hop self / keep / address changed, BGP only reloaded
the exports but it didn't apply the changes. To fix this problem
before actually implementing a proper change detection algorithm,
we restart the protocol if this setting changes.

Fixes #280.

proto/bgp/bgp.c

index 3ea21eefc41ba8b0b711612b20e0c80d445f22bb..5998a8482623d3329bdc70f242f66ff698ad25de 100644 (file)
@@ -2857,10 +2857,13 @@ bgp_channel_reconfigure(struct channel *C, struct channel_config *CC, int *impor
     *import_changed = 1;
   }
 
+  /* 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) ||
-      (new->llnh_format != old->llnh_format) ||
+      (new->next_hop_keep != old->next_hop_keep))
+    return 0;
+
+  if ((new->llnh_format != old->llnh_format) ||
       (new->aigp != old->aigp) ||
       (new->aigp_originate != old->aigp_originate))
     *export_changed = 1;