From 08d9233b3c119e21c785c120360fac606b63e7c9 Mon Sep 17 00:00:00 2001 From: Maria Matejka Date: Sun, 29 Jun 2025 18:56:27 +0200 Subject: [PATCH] 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. --- proto/bgp/bgp.c | 1 + 1 file changed, 1 insertion(+) 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); } } } -- 2.47.2