From: Maria Matejka Date: Wed, 25 Jun 2025 11:00:11 +0000 (+0200) Subject: BGP: restart on outgoing next hop setting change X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=dade7147eb6b62b2d58d478a370baef513d96975;p=thirdparty%2Fbird.git BGP: restart on outgoing next hop setting change 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. --- diff --git a/proto/bgp/bgp.c b/proto/bgp/bgp.c index 3ea21eefc..5998a8482 100644 --- a/proto/bgp/bgp.c +++ b/proto/bgp/bgp.c @@ -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;