summaryrefslogtreecommitdiff
path: root/usr.sbin/ldpd
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2013-11-26 11:59:39 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2013-11-26 11:59:39 +0000
commit3536ffb298a32547a6a1503070872df73a273559 (patch)
tree2436577458cb75b84c0391557d5a9627f327fd24 /usr.sbin/ldpd
parent85eb5acee35a0e3570c309cf3d1db2713aa83c25 (diff)
deal with msgbuf_write EAGAIN, ok gilles benno
Diffstat (limited to 'usr.sbin/ldpd')
-rw-r--r--usr.sbin/ldpd/control.c4
-rw-r--r--usr.sbin/ldpd/lde.c6
-rw-r--r--usr.sbin/ldpd/ldpd.c6
-rw-r--r--usr.sbin/ldpd/ldpe.c6
-rw-r--r--usr.sbin/ldpd/packet.c4
5 files changed, 13 insertions, 13 deletions
diff --git a/usr.sbin/ldpd/control.c b/usr.sbin/ldpd/control.c
index 5da5b4d4c70..d17e945e2be 100644
--- a/usr.sbin/ldpd/control.c
+++ b/usr.sbin/ldpd/control.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: control.c,v 1.12 2013/06/04 02:25:28 claudio Exp $ */
+/* $OpenBSD: control.c,v 1.13 2013/11/26 11:59:38 henning Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -209,7 +209,7 @@ control_dispatch_imsg(int fd, short event, void *bula)
}
}
if (event & EV_WRITE) {
- if (msgbuf_write(&c->iev.ibuf.w) == -1) {
+ if (msgbuf_write(&c->iev.ibuf.w) == -1 && errno != EAGAIN) {
control_close(fd);
return;
}
diff --git a/usr.sbin/ldpd/lde.c b/usr.sbin/ldpd/lde.c
index 9ccbea4f812..c089ca2b2df 100644
--- a/usr.sbin/ldpd/lde.c
+++ b/usr.sbin/ldpd/lde.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lde.c,v 1.27 2013/10/15 20:36:30 renato Exp $ */
+/* $OpenBSD: lde.c,v 1.28 2013/11/26 11:59:38 henning Exp $ */
/*
* Copyright (c) 2004, 2005 Claudio Jeker <claudio@openbsd.org>
@@ -211,7 +211,7 @@ lde_dispatch_imsg(int fd, short event, void *bula)
shut = 1;
}
if (event & EV_WRITE) {
- if (msgbuf_write(&ibuf->w) == -1)
+ if (msgbuf_write(&ibuf->w) == -1 && errno != EAGAIN)
fatal("msgbuf_write");
}
@@ -367,7 +367,7 @@ lde_dispatch_parent(int fd, short event, void *bula)
shut = 1;
}
if (event & EV_WRITE) {
- if (msgbuf_write(&ibuf->w) == -1)
+ if (msgbuf_write(&ibuf->w) == -1 && errno != EAGAIN)
fatal("msgbuf_write");
}
diff --git a/usr.sbin/ldpd/ldpd.c b/usr.sbin/ldpd/ldpd.c
index ce67583d6d5..a590ee4d288 100644
--- a/usr.sbin/ldpd/ldpd.c
+++ b/usr.sbin/ldpd/ldpd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ldpd.c,v 1.18 2013/10/15 20:21:25 renato Exp $ */
+/* $OpenBSD: ldpd.c,v 1.19 2013/11/26 11:59:38 henning Exp $ */
/*
* Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org>
@@ -339,7 +339,7 @@ main_dispatch_ldpe(int fd, short event, void *bula)
shut = 1;
}
if (event & EV_WRITE) {
- if (msgbuf_write(&ibuf->w) == -1)
+ if (msgbuf_write(&ibuf->w) == -1 && errno != EAGAIN)
fatal("msgbuf_write");
}
@@ -415,7 +415,7 @@ main_dispatch_lde(int fd, short event, void *bula)
shut = 1;
}
if (event & EV_WRITE) {
- if (msgbuf_write(&ibuf->w) == -1)
+ if (msgbuf_write(&ibuf->w) == -1 && errno != EAGAIN)
fatal("msgbuf_write");
}
diff --git a/usr.sbin/ldpd/ldpe.c b/usr.sbin/ldpd/ldpe.c
index 72412d5f5b8..47ac0dcce48 100644
--- a/usr.sbin/ldpd/ldpe.c
+++ b/usr.sbin/ldpd/ldpe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ldpe.c,v 1.22 2013/10/17 17:52:21 renato Exp $ */
+/* $OpenBSD: ldpe.c,v 1.23 2013/11/26 11:59:38 henning Exp $ */
/*
* Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org>
@@ -330,7 +330,7 @@ ldpe_dispatch_main(int fd, short event, void *bula)
shut = 1;
}
if (event & EV_WRITE) {
- if (msgbuf_write(&ibuf->w) == -1)
+ if (msgbuf_write(&ibuf->w) == -1 && errno != EAGAIN)
fatal("ldpe_dispatch_main: msgbuf_write");
}
@@ -470,7 +470,7 @@ ldpe_dispatch_lde(int fd, short event, void *bula)
shut = 1;
}
if (event & EV_WRITE) {
- if (msgbuf_write(&ibuf->w) == -1)
+ if (msgbuf_write(&ibuf->w) == -1 && errno != EAGAIN)
fatal("ldpe_dispatch_lde: msgbuf_write");
}
diff --git a/usr.sbin/ldpd/packet.c b/usr.sbin/ldpd/packet.c
index c063b115652..4b4bc8bc9f5 100644
--- a/usr.sbin/ldpd/packet.c
+++ b/usr.sbin/ldpd/packet.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: packet.c,v 1.33 2013/10/17 17:47:05 renato Exp $ */
+/* $OpenBSD: packet.c,v 1.34 2013/11/26 11:59:38 henning Exp $ */
/*
* Copyright (c) 2009 Michele Marchetto <michele@openbsd.org>
@@ -507,7 +507,7 @@ session_write(int fd, short event, void *arg)
struct nbr *nbr = tcp->nbr;
if (event & EV_WRITE) {
- if (msgbuf_write(&tcp->wbuf.wbuf) == -1) {
+ if (msgbuf_write(&tcp->wbuf.wbuf) == -1 && errno != EAGAIN) {
if (nbr)
nbr_fsm(nbr, NBR_EVT_CLOSE_SESSION);
}