summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2015-12-05 15:49:02 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2015-12-05 15:49:02 +0000
commit4a8ea260bea6afd2af9e739d9aa49ac00ed16510 (patch)
treee40cee758f1dbbd969d50762ae5c0b7fffcfb68a /usr.sbin
parent9484452322718830eaf7893f0e973a93d528428b (diff)
Forgot about eigrp when doing the imsg_read EAGAIN fixes.
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/eigrpctl/eigrpctl.c4
-rw-r--r--usr.sbin/eigrpd/control.c5
-rw-r--r--usr.sbin/eigrpd/eigrpd.c6
-rw-r--r--usr.sbin/eigrpd/eigrpe.c10
-rw-r--r--usr.sbin/eigrpd/rde.c10
5 files changed, 18 insertions, 17 deletions
diff --git a/usr.sbin/eigrpctl/eigrpctl.c b/usr.sbin/eigrpctl/eigrpctl.c
index 80da2317687..32641672e69 100644
--- a/usr.sbin/eigrpctl/eigrpctl.c
+++ b/usr.sbin/eigrpctl/eigrpctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: eigrpctl.c,v 1.4 2015/10/29 02:54:29 deraadt Exp $ */
+/* $OpenBSD: eigrpctl.c,v 1.5 2015/12/05 15:48:40 claudio Exp $ */
/*
* Copyright (c) 2015 Renato Westphal <renato@openbsd.org>
@@ -191,7 +191,7 @@ main(int argc, char *argv[])
err(1, "write error");
while (!done) {
- if ((n = imsg_read(ibuf)) == -1)
+ if ((n = imsg_read(ibuf)) == -1 && errno != EAGAIN)
errx(1, "imsg_read error");
if (n == 0)
errx(1, "pipe closed");
diff --git a/usr.sbin/eigrpd/control.c b/usr.sbin/eigrpd/control.c
index a62a7d8518c..61ba96f59e6 100644
--- a/usr.sbin/eigrpd/control.c
+++ b/usr.sbin/eigrpd/control.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: control.c,v 1.1 2015/10/02 04:26:47 renato Exp $ */
+/* $OpenBSD: control.c,v 1.2 2015/12/05 15:49:01 claudio Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -221,7 +221,8 @@ control_dispatch_imsg(int fd, short event, void *bula)
}
if (event & EV_READ) {
- if ((n = imsg_read(&c->iev.ibuf)) == -1 || n == 0) {
+ if (((n = imsg_read(&c->iev.ibuf)) == -1 && errno != EAGAIN) ||
+ n == 0) {
control_close(fd);
return;
}
diff --git a/usr.sbin/eigrpd/eigrpd.c b/usr.sbin/eigrpd/eigrpd.c
index 559bf056214..62f8ffd5871 100644
--- a/usr.sbin/eigrpd/eigrpd.c
+++ b/usr.sbin/eigrpd/eigrpd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: eigrpd.c,v 1.3 2015/10/21 03:52:12 renato Exp $ */
+/* $OpenBSD: eigrpd.c,v 1.4 2015/12/05 15:49:01 claudio Exp $ */
/*
* Copyright (c) 2015 Renato Westphal <renato@openbsd.org>
@@ -349,7 +349,7 @@ main_dispatch_eigrpe(int fd, short event, void *bula)
ibuf = &iev->ibuf;
if (event & EV_READ) {
- if ((n = imsg_read(ibuf)) == -1)
+ if ((n = imsg_read(ibuf)) == -1 && errno != EAGAIN)
fatal("imsg_read error");
if (n == 0) /* connection closed */
shut = 1;
@@ -426,7 +426,7 @@ main_dispatch_rde(int fd, short event, void *bula)
ibuf = &iev->ibuf;
if (event & EV_READ) {
- if ((n = imsg_read(ibuf)) == -1)
+ if ((n = imsg_read(ibuf)) == -1 && errno != EAGAIN)
fatal("imsg_read error");
if (n == 0) /* connection closed */
shut = 1;
diff --git a/usr.sbin/eigrpd/eigrpe.c b/usr.sbin/eigrpd/eigrpe.c
index 4c97a556f40..f40dcd65267 100644
--- a/usr.sbin/eigrpd/eigrpe.c
+++ b/usr.sbin/eigrpd/eigrpe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: eigrpe.c,v 1.8 2015/10/25 00:43:35 renato Exp $ */
+/* $OpenBSD: eigrpe.c,v 1.9 2015/12/05 15:49:01 claudio Exp $ */
/*
* Copyright (c) 2015 Renato Westphal <renato@openbsd.org>
@@ -256,7 +256,7 @@ eigrpe_dispatch_main(int fd, short event, void *bula)
int n, shut = 0;
if (event & EV_READ) {
- if ((n = imsg_read(ibuf)) == -1)
+ if ((n = imsg_read(ibuf)) == -1 && errno != EAGAIN)
fatal("imsg_read error");
if (n == 0) /* connection closed */
shut = 1;
@@ -270,7 +270,7 @@ eigrpe_dispatch_main(int fd, short event, void *bula)
for (;;) {
if ((n = imsg_get(ibuf, &imsg)) == -1)
- fatal("eigrpe_dispatch_main: imsg_read error");
+ fatal("eigrpe_dispatch_main: imsg_get error");
if (n == 0)
break;
@@ -420,7 +420,7 @@ eigrpe_dispatch_rde(int fd, short event, void *bula)
int n, shut = 0;
if (event & EV_READ) {
- if ((n = imsg_read(ibuf)) == -1)
+ if ((n = imsg_read(ibuf)) == -1 && errno != EAGAIN)
fatal("imsg_read error");
if (n == 0) /* connection closed */
shut = 1;
@@ -434,7 +434,7 @@ eigrpe_dispatch_rde(int fd, short event, void *bula)
for (;;) {
if ((n = imsg_get(ibuf, &imsg)) == -1)
- fatal("eigrpe_dispatch_rde: imsg_read error");
+ fatal("eigrpe_dispatch_rde: imsg_get error");
if (n == 0)
break;
diff --git a/usr.sbin/eigrpd/rde.c b/usr.sbin/eigrpd/rde.c
index 441d2d8ad01..ec733b39d61 100644
--- a/usr.sbin/eigrpd/rde.c
+++ b/usr.sbin/eigrpd/rde.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rde.c,v 1.7 2015/10/27 03:27:35 renato Exp $ */
+/* $OpenBSD: rde.c,v 1.8 2015/12/05 15:49:01 claudio Exp $ */
/*
* Copyright (c) 2015 Renato Westphal <renato@openbsd.org>
@@ -204,7 +204,7 @@ rde_dispatch_imsg(int fd, short event, void *bula)
ibuf = &iev->ibuf;
if (event & EV_READ) {
- if ((n = imsg_read(ibuf)) == -1)
+ if ((n = imsg_read(ibuf)) == -1 && errno != EAGAIN)
fatal("imsg_read error");
if (n == 0) /* connection closed */
shut = 1;
@@ -218,7 +218,7 @@ rde_dispatch_imsg(int fd, short event, void *bula)
for (;;) {
if ((n = imsg_get(ibuf, &imsg)) == -1)
- fatal("rde_dispatch_imsg: imsg_read error");
+ fatal("rde_dispatch_imsg: imsg_get error");
if (n == 0)
break;
@@ -339,7 +339,7 @@ rde_dispatch_parent(int fd, short event, void *bula)
ibuf = &iev->ibuf;
if (event & EV_READ) {
- if ((n = imsg_read(ibuf)) == -1)
+ if ((n = imsg_read(ibuf)) == -1 && errno != EAGAIN)
fatal("imsg_read error");
if (n == 0) /* connection closed */
shut = 1;
@@ -353,7 +353,7 @@ rde_dispatch_parent(int fd, short event, void *bula)
for (;;) {
if ((n = imsg_get(ibuf, &imsg)) == -1)
- fatal("rde_dispatch_parent: imsg_read error");
+ fatal("rde_dispatch_parent: imsg_get error");
if (n == 0)
break;