summaryrefslogtreecommitdiff
path: root/sbin/iked
diff options
context:
space:
mode:
Diffstat (limited to 'sbin/iked')
-rw-r--r--sbin/iked/control.c5
-rw-r--r--sbin/iked/proc.c4
2 files changed, 5 insertions, 4 deletions
diff --git a/sbin/iked/control.c b/sbin/iked/control.c
index e08a2b9a666..32ef9e60397 100644
--- a/sbin/iked/control.c
+++ b/sbin/iked/control.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: control.c,v 1.20 2015/11/23 19:28:33 reyk Exp $ */
+/* $OpenBSD: control.c,v 1.21 2015/12/05 13:09:46 claudio Exp $ */
/*
* Copyright (c) 2010-2013 Reyk Floeter <reyk@openbsd.org>
@@ -263,7 +263,8 @@ control_dispatch_imsg(int fd, short event, void *arg)
}
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, cs);
return;
}
diff --git a/sbin/iked/proc.c b/sbin/iked/proc.c
index c6948d9a129..32e823e81f6 100644
--- a/sbin/iked/proc.c
+++ b/sbin/iked/proc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: proc.c,v 1.26 2015/11/23 19:28:34 reyk Exp $ */
+/* $OpenBSD: proc.c,v 1.27 2015/12/05 13:09:46 claudio Exp $ */
/*
* Copyright (c) 2010 - 2014 Reyk Floeter <reyk@openbsd.org>
@@ -456,7 +456,7 @@ proc_dispatch(int fd, short event, void *arg)
ibuf = &iev->ibuf;
if (event & EV_READ) {
- if ((n = imsg_read(ibuf)) == -1)
+ if ((n = imsg_read(ibuf)) == -1 && errno != EAGAIN)
fatal(__func__);
if (n == 0) {
/* this pipe is dead, so remove the event handler */