mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2025-01-27 03:10:03 +00:00
BGP: fix shutdown crash when dynamic peer is just connected
In some edge cases, the dynamic BGP starts but doesn't yet pick up the socket from the peer, when it gets shut down, typically on a complete shutdown. Fixing this to just close the socket, not assert it being already picked up.
This commit is contained in:
parent
77582da162
commit
d13c9d378f
@ -581,8 +581,10 @@ bgp_graceful_close_conn(struct bgp_conn *conn, int subcode, byte *data, uint len
|
||||
static void
|
||||
bgp_down(struct bgp_proto *p)
|
||||
{
|
||||
/* Check that the dynamic BGP socket has been picked up */
|
||||
ASSERT_DIE(p->postponed_sk == NULL);
|
||||
/* Close the possibly unpicked dynamic BGP socket */
|
||||
if (p->postponed_sk)
|
||||
sk_close(p->postponed_sk);
|
||||
p->postponed_sk = NULL;
|
||||
|
||||
if (bgp_start_state(p) > BSS_PREPARE)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user