summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd/session.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/bgpd/session.c')
-rw-r--r--usr.sbin/bgpd/session.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/usr.sbin/bgpd/session.c b/usr.sbin/bgpd/session.c
index c72b899d3c1..35f956d8cad 100644
--- a/usr.sbin/bgpd/session.c
+++ b/usr.sbin/bgpd/session.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: session.c,v 1.121 2004/02/26 16:16:41 claudio Exp $ */
+/* $OpenBSD: session.c,v 1.122 2004/03/05 13:17:14 henning Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -649,6 +649,13 @@ change_state(struct peer *peer, enum session_state state,
switch (state) {
case STATE_IDLE:
/*
+ * try to write out what's buffered (maybe a notification),
+ * don't bother if it fails
+ */
+ if (peer->state >= STATE_OPENSENT && peer->wbuf.queued)
+ msgbuf_write(&peer->wbuf);
+
+ /*
* we must start the timer for the next EVNT_START
* if we are coming here due to an error and the
* session was not established successfully before, the