From dade7147eb6b62b2d58d478a370baef513d96975 Mon Sep 17 00:00:00 2001 From: Maria Matejka Date: Wed, 25 Jun 2025 13:00:11 +0200 Subject: [PATCH] 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. --- proto/bgp/bgp.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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; -- 2.47.2