summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd/session.c
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2022-08-26 14:10:53 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2022-08-26 14:10:53 +0000
commit6b9302e195f8a83a9aaac63315f7f242d66237df (patch)
tree5959d565c5bd924f413c4ef06419f1236a80b56c /usr.sbin/bgpd/session.c
parent382a85f2013a0026c061dc118a55f989f9deb274 (diff)
Handle IMSG_SESSION_* messages immediatly when received and do not put
them on the per peer imsg queue. This is mainly for IMSG_SESSION_DOWN. Delaying the session down can race against IMSG_SESSION_ADD which is handled immediatly and as a result an establised connection may be removed in the RDE because of it. The various graceful restart imsgs need similar treatment for similar reasons. In the end when a session is reset/closed the RDE needs to stop all work and flush the per peer imsg queue. With this only update and route refresh messages are handled via the imsg queue. OK tb@
Diffstat (limited to 'usr.sbin/bgpd/session.c')
-rw-r--r--usr.sbin/bgpd/session.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/bgpd/session.c b/usr.sbin/bgpd/session.c
index 40a9a70d8a1..204e64b2ee6 100644
--- a/usr.sbin/bgpd/session.c
+++ b/usr.sbin/bgpd/session.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: session.c,v 1.433 2022/08/17 15:15:26 claudio Exp $ */
+/* $OpenBSD: session.c,v 1.434 2022/08/26 14:10:52 claudio Exp $ */
/*
* Copyright (c) 2003, 2004, 2005 Henning Brauer <henning@openbsd.org>
@@ -1760,7 +1760,7 @@ session_graceful_restart(struct peer *p)
aid2str(i));
p->capa.neg.grestart.flags[i] |= CAPA_GR_RESTARTING;
} else if (p->capa.neg.mp[i]) {
- if (imsg_rde(IMSG_SESSION_FLUSH, p->conf.id,
+ if (imsg_rde(IMSG_SESSION_NOGRACE, p->conf.id,
&i, sizeof(i)) == -1)
return (-1);
log_peer_warnx(&p->conf,