summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2004-02-17 20:48:06 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2004-02-17 20:48:06 +0000
commit66445cba3bee47017bceef720df633956a410ccd (patch)
treeab523f83df2c4b2eb9316a2041bb8441bcbcc6b4
parent4ee2f3a4b6a380ef6e2525c36e87f9c3ca3fc9a2 (diff)
check for EAGAIN after read
-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 61d22f1f409..4814c0f589c 100644
--- a/usr.sbin/bgpd/session.c
+++ b/usr.sbin/bgpd/session.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: session.c,v 1.113 2004/02/17 15:53:17 henning Exp $ */
+/* $OpenBSD: session.c,v 1.114 2004/02/17 20:48:05 henning Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -1137,7 +1137,7 @@ session_dispatch_msg(struct pollfd *pfd, struct peer *p)
if ((n = read(p->sock, p->rbuf->buf + p->rbuf->wpos,
sizeof(p->rbuf->buf) - p->rbuf->wpos)) ==
-1) {
- if (errno != EINTR) {
+ if (errno != EINTR && errno != EAGAIN) {
log_peer_warn(&p->conf, "read error");
bgp_fsm(p, EVNT_CON_FATAL);
}