diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2004-05-06 09:11:19 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2004-05-06 09:11:19 +0000 |
commit | 34ddd6d8bd574df95737568a56ff457c6a1b2090 (patch) | |
tree | f0401a5de6c6f07193934bdf8eb302391f33c200 /usr.sbin | |
parent | 540f328a147da5d65b028b39153326a2cfb61b42 (diff) |
there's a little race condition: a session is taken down and its associated
write buffers are cleared, but there could be imsgs from the RDE for that peer
(e. g. UPDATEs) in the read buffers for the pipe to the RDE or buffered in
the RDE or somesuch. Thus, in session_update(), explicitely check for the
session state and just drop the message if the session is not in state
ESTABLISHED.
claudio ok
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/bgpd/session.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.sbin/bgpd/session.c b/usr.sbin/bgpd/session.c index 0a61325dc73..4beadcaa934 100644 --- a/usr.sbin/bgpd/session.c +++ b/usr.sbin/bgpd/session.c @@ -1,4 +1,4 @@ -/* $OpenBSD: session.c,v 1.162 2004/04/29 19:56:04 deraadt Exp $ */ +/* $OpenBSD: session.c,v 1.163 2004/05/06 09:11:18 henning Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -1137,6 +1137,9 @@ session_update(u_int32_t peerid, void *data, size_t datalen) return; } + if (p->state != STATE_ESTABLISHED) + return; + len = MSGSIZE_HEADER + datalen; memset(&msg.marker, 0xff, sizeof(msg.marker)); |