From: Maria Matejka Date: Tue, 6 May 2025 17:54:11 +0000 (+0200) Subject: BGP: Fix reconfiguration of import behavior modifiers X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7ebdd288358ab14c6f5911c636ed3cb3bc453620;p=thirdparty%2Fbird.git BGP: Fix reconfiguration of import behavior modifiers In case of aigp, gw mode and cost change, we need to reload routes from the peer, and do that forcibly even if import table is on. --- diff --git a/proto/bgp/bgp.c b/proto/bgp/bgp.c index 922c98636..e5d0dba29 100644 --- a/proto/bgp/bgp.c +++ b/proto/bgp/bgp.c @@ -3112,11 +3112,20 @@ bgp_channel_reconfigure(struct channel *C, struct channel_config *CC, int *impor (new->aigp != old->aigp) || (new->cost != old->cost)) { - /* If import table is active and route refresh is possible, we just ask for route refresh */ - if ((c->c.in_keep & RIK_PREFILTER) && (c->c.channel_state == CS_UP) && p->route_refresh) - bgp_schedule_packet(p->conn, c, PKT_ROUTE_REFRESH); + /* If import table is active we have to flush it */ + if ((c->c.in_keep & RIK_PREFILTER) == RIK_PREFILTER) + { + if (p->route_refresh) + { + if (c->c.channel_state == CS_UP) + bgp_schedule_packet(p->conn, c, PKT_ROUTE_REFRESH); + } + else + /* Route refresh not possible, restart needed */ + return 0; + } - /* Otherwise we do complete reload */ + /* Otherwise we just do complete reload */ else *import_changed = 1; }