summaryrefslogtreecommitdiff
path: root/usr.sbin/ospfctl
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/ospfctl
parent8d9d9c4749a82bfc44deb4ea496de0efa328e1bd (diff)
handle msgbuf_write() returning EAGAIN, looks right to deraadt
Diffstat (limited to 'usr.sbin/ospfctl')
-rw-r--r--usr.sbin/ospfctl/ospfctl.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/ospfctl/ospfctl.c b/usr.sbin/ospfctl/ospfctl.c
index 47be03b0e7a..ac38df304f1 100644
--- a/usr.sbin/ospfctl/ospfctl.c
+++ b/usr.sbin/ospfctl/ospfctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ospfctl.c,v 1.57 2013/04/09 14:51:33 gilles Exp $ */
+/* $OpenBSD: ospfctl.c,v 1.58 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>
@@ -245,7 +246,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) {