summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ospf6ctl/ospf6ctl.c
diff options
context:
space:
mode:
authorsthen <sthen@openbsd.org>2013-11-13 22:52:41 +0000
committersthen <sthen@openbsd.org>2013-11-13 22:52:41 +0000
commitc0dbf5cffc1b6677cfbec9ac554087741e99aeec (patch)
treee692e9a3d7520d89d3f3e94d3776343f06cffa2a /usr.sbin/ospf6ctl/ospf6ctl.c
parentsync (diff)
downloadwireguard-openbsd-c0dbf5cffc1b6677cfbec9ac554087741e99aeec.tar.xz
wireguard-openbsd-c0dbf5cffc1b6677cfbec9ac554087741e99aeec.zip
handle msgbuf_write() returning EAGAIN, looks right to deraadt
Diffstat (limited to 'usr.sbin/ospf6ctl/ospf6ctl.c')
-rw-r--r--usr.sbin/ospf6ctl/ospf6ctl.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/ospf6ctl/ospf6ctl.c b/usr.sbin/ospf6ctl/ospf6ctl.c
index 3653a638da8..3dfd1325d5e 100644
--- a/usr.sbin/ospf6ctl/ospf6ctl.c
+++ b/usr.sbin/ospf6ctl/ospf6ctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ospf6ctl.c,v 1.37 2013/03/22 14:25:31 sthen Exp $ */
+/* $OpenBSD: ospf6ctl.c,v 1.38 2013/11/13 22:52:41 sthen Exp $ */
/*
* Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org>
@@ -27,6 +27,7 @@
#include <net/if_types.h>
#include <err.h>
+#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -235,7 +236,7 @@ main(int argc, char *argv[])
}
while (ibuf->w.queued)
- if (msgbuf_write(&ibuf->w) < 0)
+ if (msgbuf_write(&ibuf->w) <= 0 && errno != EAGAIN)
err(1, "write error");
while (!done) {