From: Maria Matejka Date: Sun, 29 Jun 2025 16:56:27 +0000 (+0200) Subject: BGP: Fix crash on listening socket failure X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=08d9233b3c119e21c785c120360fac606b63e7c9;p=thirdparty%2Fbird.git BGP: Fix crash on listening socket failure In that specific case, bgp_stop() runs from the main loop, effectively causing the deferred state announcement to run from a bad context. Fixed by forcibly announcing the state immediately. --- diff --git a/proto/bgp/bgp.c b/proto/bgp/bgp.c index adfa74f97..d55c58ae0 100644 --- a/proto/bgp/bgp.c +++ b/proto/bgp/bgp.c @@ -876,6 +876,7 @@ bgp_initiate_disable(struct bgp_proto *p, int err_val) p->p.disabled = 1; bgp_store_error(p, NULL, BE_MISC, err_val); bgp_stop(p, err_val, NULL, 0); + proto_announce_state(&p->p, p->p.ea_state); } } }