summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ripd/ripe.c
diff options
context:
space:
mode:
authorclaudio <claudio@openbsd.org>2015-12-05 13:13:47 +0000
committerclaudio <claudio@openbsd.org>2015-12-05 13:13:47 +0000
commit79e8bbf6a1da96027c414cde8bac0cad2676d515 (patch)
tree9502704dd9435b60c2d7f8924607d730fcc27d86 /usr.sbin/ripd/ripe.c
parentEAGAIN handling for imsg_read. OK henning@ benno@ (diff)
downloadwireguard-openbsd-79e8bbf6a1da96027c414cde8bac0cad2676d515.tar.xz
wireguard-openbsd-79e8bbf6a1da96027c414cde8bac0cad2676d515.zip
EAGAIN handling for imsg_read. OK henning@ benno@
Diffstat (limited to 'usr.sbin/ripd/ripe.c')
-rw-r--r--usr.sbin/ripd/ripe.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.sbin/ripd/ripe.c b/usr.sbin/ripd/ripe.c
index 86d1d5382e4..48d6aae1f26 100644
--- a/usr.sbin/ripd/ripe.c
+++ b/usr.sbin/ripd/ripe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ripe.c,v 1.18 2015/02/09 12:34:07 claudio Exp $ */
+/* $OpenBSD: ripe.c,v 1.19 2015/12/05 13:13:47 claudio Exp $ */
/*
* Copyright (c) 2006 Michele Marchetto <mydecay@openbeer.it>
@@ -234,7 +234,7 @@ ripe_dispatch_main(int fd, short event, void *bula)
int link_ok, 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;
@@ -248,7 +248,7 @@ ripe_dispatch_main(int fd, short event, void *bula)
for (;;) {
if ((n = imsg_get(ibuf, &imsg)) == -1)
- fatal("ripe_dispatch_main: imsg_read error");
+ fatal("ripe_dispatch_main: imsg_get error");
if (n == 0)
break;
@@ -314,7 +314,7 @@ ripe_dispatch_rde(int fd, short event, void *bula)
int 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;
@@ -328,7 +328,7 @@ ripe_dispatch_rde(int fd, short event, void *bula)
for (;;) {
if ((n = imsg_get(ibuf, &imsg)) == -1)
- fatal("ripe_dispatch_rde: imsg_read error");
+ fatal("ripe_dispatch_rde: imsg_get error");
if (n == 0)
break;