diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2007-03-19 10:10:30 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2007-03-19 10:10:30 +0000 |
commit | 163943975a360a0fbc4d140d18ec9c783be371c0 (patch) | |
tree | 273dff377a5c5baa56428123da226c1f00e08ae4 /usr.sbin/ripd | |
parent | cd824277452bd56d0d2484a648a49d8cd3b399fe (diff) |
do not signal "connection closed" upstream on EINTR/EAGAIN, from bgpd et al
Diffstat (limited to 'usr.sbin/ripd')
-rw-r--r-- | usr.sbin/ripd/control.c | 4 | ||||
-rw-r--r-- | usr.sbin/ripd/imsg.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/ripd/control.c b/usr.sbin/ripd/control.c index dda14acb4dc..177b7976a5b 100644 --- a/usr.sbin/ripd/control.c +++ b/usr.sbin/ripd/control.c @@ -1,4 +1,4 @@ -/* $OpenBSD: control.c,v 1.2 2007/01/23 17:38:10 claudio Exp $ */ +/* $OpenBSD: control.c,v 1.3 2007/03/19 10:10:29 henning Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -196,7 +196,7 @@ control_dispatch_imsg(int fd, short event, void *bula) switch (event) { case EV_READ: - if ((n = imsg_read(&c->ibuf)) <= 0) { + if ((n = imsg_read(&c->ibuf)) == -1 || n == 0) { control_close(fd); return; } diff --git a/usr.sbin/ripd/imsg.c b/usr.sbin/ripd/imsg.c index 51157ee5ad4..28a9cb17ba7 100644 --- a/usr.sbin/ripd/imsg.c +++ b/usr.sbin/ripd/imsg.c @@ -1,4 +1,4 @@ -/* $OpenBSD: imsg.c,v 1.1 2006/10/18 16:11:58 norby Exp $ */ +/* $OpenBSD: imsg.c,v 1.2 2007/03/19 10:10:29 henning Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -50,7 +50,7 @@ imsg_read(struct imsgbuf *ibuf) log_warn("imsg_read: pipe read error"); return (-1); } - return (0); + return (-2); } ibuf->r.wpos += n; |