summaryrefslogtreecommitdiff
path: root/usr.sbin/ospf6ctl
diff options
context:
space:
mode:
authorStuart Henderson <sthen@cvs.openbsd.org>2013-11-13 22:52:42 +0000
committerStuart Henderson <sthen@cvs.openbsd.org>2013-11-13 22:52:42 +0000
commit033a066cbf11557cabc369d28e45c57f9435f16a (patch)
treec856d4b8feca8f94ac5a9df7eff968a048ad6250 /usr.sbin/ospf6ctl
parent8d9d9c4749a82bfc44deb4ea496de0efa328e1bd (diff)
handle msgbuf_write() returning EAGAIN, looks right to deraadt
Diffstat (limited to 'usr.sbin/ospf6ctl')
-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) {