summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bin/systrace/cradle.c6
-rw-r--r--lib/libc/rpc/svc_tcp.c5
-rw-r--r--libexec/identd/identd.c9
-rw-r--r--libexec/uucpd/uucpd.c5
-rw-r--r--sbin/iked/control.c5
-rw-r--r--sbin/nfsd/nfsd.c5
-rw-r--r--usr.bin/talk/invite.c5
-rw-r--r--usr.bin/tcpbench/tcpbench.c3
-rw-r--r--usr.sbin/bgpd/control.c5
-rw-r--r--usr.sbin/bgpd/session.c11
-rw-r--r--usr.sbin/dvmrpd/control.c5
-rw-r--r--usr.sbin/ftp-proxy/ftp-proxy.c6
-rw-r--r--usr.sbin/inetd/inetd.c9
-rw-r--r--usr.sbin/iscsid/control.c5
-rw-r--r--usr.sbin/ldpd/control.c5
-rw-r--r--usr.sbin/ldpd/packet.c5
-rw-r--r--usr.sbin/lpr/lpd/lpd.c5
-rw-r--r--usr.sbin/npppd/pptp/pptpd.c9
-rw-r--r--usr.sbin/ospf6d/control.c5
-rw-r--r--usr.sbin/ospfd/control.c5
-rw-r--r--usr.sbin/ppp/ppp/server.c10
-rw-r--r--usr.sbin/relayd/control.c5
-rw-r--r--usr.sbin/ripd/control.c5
-rw-r--r--usr.sbin/sasyncd/net.c5
-rw-r--r--usr.sbin/smtpd/control.c5
-rw-r--r--usr.sbin/smtpd/smtp.c5
-rw-r--r--usr.sbin/snmpd/control.c5
-rw-r--r--usr.sbin/syslogd/syslogd.c5
28 files changed, 99 insertions, 64 deletions
diff --git a/bin/systrace/cradle.c b/bin/systrace/cradle.c
index 2219ec24734..c0fa85d5171 100644
--- a/bin/systrace/cradle.c
+++ b/bin/systrace/cradle.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cradle.c,v 1.5 2010/05/29 10:29:11 deraadt Exp $ */
+/* $OpenBSD: cradle.c,v 1.6 2013/03/11 17:40:10 deraadt Exp $ */
/*
* Copyright (c) 2003 Marius Aamodt Eriksen <marius@monkey.org>
@@ -259,7 +259,9 @@ listen_cb(int fd, short which, void *arg)
s = accept(fd, &sa, &salen);
if (s == -1) {
- warn("accept()");
+ if (errno != EINTR && errno != EWOULDBLOCK &&
+ errno != ECONNABORTED)
+ warn("accept()");
goto out;
}
diff --git a/lib/libc/rpc/svc_tcp.c b/lib/libc/rpc/svc_tcp.c
index 85902ecb84e..a1a6ef44b58 100644
--- a/lib/libc/rpc/svc_tcp.c
+++ b/lib/libc/rpc/svc_tcp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: svc_tcp.c,v 1.30 2010/09/01 14:43:34 millert Exp $ */
+/* $OpenBSD: svc_tcp.c,v 1.31 2013/03/11 17:40:09 deraadt Exp $ */
/*
* Copyright (c) 2010, Oracle America, Inc.
@@ -251,7 +251,8 @@ rendezvous_request(SVCXPRT *xprt, struct rpc_msg *ignored)
len = sizeof(struct sockaddr_in);
if ((sock = accept(xprt->xp_sock, (struct sockaddr *)&addr,
&len)) < 0) {
- if (errno == EINTR)
+ if (errno == EINTR || errno == EWOULDBLOCK ||
+ errno == ECONNABORTED)
goto again;
return (FALSE);
}
diff --git a/libexec/identd/identd.c b/libexec/identd/identd.c
index f1c86735fe9..fda10cdf870 100644
--- a/libexec/identd/identd.c
+++ b/libexec/identd/identd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: identd.c,v 1.51 2013/03/09 17:40:57 deraadt Exp $ */
+/* $OpenBSD: identd.c,v 1.52 2013/03/11 17:40:10 deraadt Exp $ */
/*
* This program is in the public domain and may be used freely by anyone
@@ -426,8 +426,13 @@ main(int argc, char *argv[])
* Accept the new client
*/
fd = accept(pfds[i].fd, NULL, NULL);
- if (fd == -1)
+ if (fd == -1) {
+ if (errno == EWOULDBLOCK ||
+ errno == EINTR ||
+ errno == ECONNABORTED)
+ continue;
error("main: accept. errno = %d", errno);
+ }
/*
* Fork a child, parent continues
diff --git a/libexec/uucpd/uucpd.c b/libexec/uucpd/uucpd.c
index 2b38ea62ad2..fada87d74bb 100644
--- a/libexec/uucpd/uucpd.c
+++ b/libexec/uucpd/uucpd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uucpd.c,v 1.32 2009/10/27 23:59:32 deraadt Exp $ */
+/* $OpenBSD: uucpd.c,v 1.33 2013/03/11 17:40:10 deraadt Exp $ */
/*
* Copyright (c) 1985 The Regents of the University of California.
@@ -136,7 +136,8 @@ main(int argc, char *argv[])
for(;;) {
s = accept(tcp_socket, &hisctladdr, &hisaddrlen);
if (s < 0){
- if (errno == EINTR)
+ if (errno == EINTR || errno == EWOULDBLOCK ||
+ errno == ECONNABORTED)
continue;
perror("uucpd: accept");
exit(1);
diff --git a/sbin/iked/control.c b/sbin/iked/control.c
index d4fa011d8b2..b9d71f499f3 100644
--- a/sbin/iked/control.c
+++ b/sbin/iked/control.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: control.c,v 1.10 2013/01/08 10:38:19 reyk Exp $ */
+/* $OpenBSD: control.c,v 1.11 2013/03/11 17:40:10 deraadt Exp $ */
/*
* Copyright (c) 2010-2013 Reyk Floeter <reyk@openbsd.org>
@@ -165,7 +165,8 @@ control_accept(int listenfd, short event, void *arg)
event_del(&cs->cs_ev);
evtimer_add(&cs->cs_evt, &evtpause);
- } else if (errno != EWOULDBLOCK && errno != EINTR)
+ } else if (errno != EWOULDBLOCK && errno != EINTR &&
+ errno != ECONNABORTED)
log_warn("%s: accept", __func__);
return;
}
diff --git a/sbin/nfsd/nfsd.c b/sbin/nfsd/nfsd.c
index 6c26ed8fc8a..c6e9c133f7f 100644
--- a/sbin/nfsd/nfsd.c
+++ b/sbin/nfsd/nfsd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nfsd.c,v 1.31 2010/04/17 16:27:49 krw Exp $ */
+/* $OpenBSD: nfsd.c,v 1.32 2013/03/11 17:40:10 deraadt Exp $ */
/* $NetBSD: nfsd.c,v 1.19 1996/02/18 23:18:56 mycroft Exp $ */
/*
@@ -304,6 +304,9 @@ main(int argc, char *argv[])
len = sizeof(inetpeer);
if ((msgsock = accept(tcpsock,
(struct sockaddr *)&inetpeer, &len)) < 0) {
+ if (errno == EWOULDBLOCK || errno == EINTR ||
+ errno == ECONNABORTED)
+ continue;
syslog(LOG_ERR, "accept failed: %m");
return (1);
}
diff --git a/usr.bin/talk/invite.c b/usr.bin/talk/invite.c
index 6a63d4d258e..b12a20d01d0 100644
--- a/usr.bin/talk/invite.c
+++ b/usr.bin/talk/invite.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: invite.c,v 1.14 2009/10/27 23:59:44 deraadt Exp $ */
+/* $OpenBSD: invite.c,v 1.15 2013/03/11 17:40:11 deraadt Exp $ */
/* $NetBSD: invite.c,v 1.3 1994/12/09 02:14:18 jtc Exp $ */
/*
@@ -95,7 +95,8 @@ invite_remote(void)
signal(SIGALRM, re_invite);
(void) setjmp(invitebuf);
while ((new_sockt = accept(sockt, &rp, &rplen)) == -1) {
- if (errno == EINTR || errno == ECONNABORTED)
+ if (errno == EINTR || errno == EWOULDBLOCK ||
+ errno == ECONNABORTED)
continue;
quit("Unable to connect with your party", 1);
}
diff --git a/usr.bin/tcpbench/tcpbench.c b/usr.bin/tcpbench/tcpbench.c
index d467593a215..f6c000cbf8d 100644
--- a/usr.bin/tcpbench/tcpbench.c
+++ b/usr.bin/tcpbench/tcpbench.c
@@ -689,7 +689,8 @@ tcp_server_accept(int fd, short event, void *arg)
event_del(&ts->ev);
evtimer_add(&ts->evt, &evtpause);
- } else if (errno != EWOULDBLOCK && errno != EINTR)
+ } else if (errno != EWOULDBLOCK && errno != EINTR &&
+ errno != ECONNABORTED)
warn("accept");
return;
}
diff --git a/usr.sbin/bgpd/control.c b/usr.sbin/bgpd/control.c
index 37e67bb280e..47b8b45fb6b 100644
--- a/usr.sbin/bgpd/control.c
+++ b/usr.sbin/bgpd/control.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: control.c,v 1.73 2013/03/07 21:26:28 claudio Exp $ */
+/* $OpenBSD: control.c,v 1.74 2013/03/11 17:40:11 deraadt Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -125,7 +125,8 @@ control_accept(int listenfd, int restricted)
if (errno == ENFILE || errno == EMFILE) {
pauseaccept = getmonotime();
return (0);
- } else if (errno != EWOULDBLOCK && errno != EINTR)
+ } else if (errno != EWOULDBLOCK && errno != EINTR &&
+ errno != ECONNABORTED)
log_warn("control_accept: accept");
return (0);
}
diff --git a/usr.sbin/bgpd/session.c b/usr.sbin/bgpd/session.c
index ae8d7a503bb..1218c5019f9 100644
--- a/usr.sbin/bgpd/session.c
+++ b/usr.sbin/bgpd/session.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: session.c,v 1.327 2013/03/07 21:26:28 claudio Exp $ */
+/* $OpenBSD: session.c,v 1.328 2013/03/11 17:40:11 deraadt Exp $ */
/*
* Copyright (c) 2003, 2004, 2005 Henning Brauer <henning@openbsd.org>
@@ -1037,13 +1037,12 @@ session_accept(int listenfd)
len = sizeof(cliaddr);
if ((connfd = accept(listenfd,
(struct sockaddr *)&cliaddr, &len)) == -1) {
- if (errno == ENFILE || errno == EMFILE) {
+ if (errno == ENFILE || errno == EMFILE)
pauseaccept = getmonotime();
- return;
- } else if (errno == EWOULDBLOCK || errno == EINTR)
- return;
- else
+ else if (errno != EWOULDBLOCK && errno != EINTR &&
+ errno != ECONNABORTED)
log_warn("accept");
+ return;
}
p = getpeerbyip((struct sockaddr *)&cliaddr);
diff --git a/usr.sbin/dvmrpd/control.c b/usr.sbin/dvmrpd/control.c
index 7d3fd7dc37f..c3cbde4050f 100644
--- a/usr.sbin/dvmrpd/control.c
+++ b/usr.sbin/dvmrpd/control.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: control.c,v 1.16 2012/04/11 08:34:41 deraadt Exp $ */
+/* $OpenBSD: control.c,v 1.17 2013/03/11 17:40:11 deraadt Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -134,7 +134,8 @@ control_accept(int listenfd, short event, void *bula)
event_del(&control_state.ev);
evtimer_add(&control_state.evt, &evtpause);
- } else if (errno != EWOULDBLOCK && errno != EINTR)
+ } else if (errno != EWOULDBLOCK && errno != EINTR &&
+ errno != ECONNABORTED)
log_warn("control_accept: accept");
return;
}
diff --git a/usr.sbin/ftp-proxy/ftp-proxy.c b/usr.sbin/ftp-proxy/ftp-proxy.c
index 38a81e3f707..936ba06c106 100644
--- a/usr.sbin/ftp-proxy/ftp-proxy.c
+++ b/usr.sbin/ftp-proxy/ftp-proxy.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ftp-proxy.c,v 1.26 2013/03/10 21:28:26 benno Exp $ */
+/* $OpenBSD: ftp-proxy.c,v 1.27 2013/03/11 17:40:11 deraadt Exp $ */
/*
* Copyright (c) 2004, 2005 Camiel Dobbelaar, <cd@sentia.nl>
@@ -435,7 +435,9 @@ handle_connection(const int listen_fd, short event, void *arg)
event_del(&listen_ev);
evtimer_add(&pause_accept_ev, &pause);
- }
+ } else if (errno != EWOULDBLOCK && errno != EINTR &&
+ errno != ECONNABORTED)
+ logmsg(LOG_CRIT, "accept() failed: %s", strerror(errno));
return;
}
diff --git a/usr.sbin/inetd/inetd.c b/usr.sbin/inetd/inetd.c
index 765709616b6..92639260eba 100644
--- a/usr.sbin/inetd/inetd.c
+++ b/usr.sbin/inetd/inetd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: inetd.c,v 1.133 2012/04/19 14:33:24 gsoares Exp $ */
+/* $OpenBSD: inetd.c,v 1.134 2013/03/11 17:40:11 deraadt Exp $ */
/*
* Copyright (c) 1983,1991 The Regents of the University of California.
@@ -496,9 +496,10 @@ gettcp(struct servtab *sep)
if (debug)
fprintf(stderr, "accept, ctrl %d\n", ctrl);
if (ctrl < 0) {
- if (errno == EINTR)
- return -1;
- syslog(LOG_WARNING, "accept (for %s): %m", sep->se_service);
+ if (errno != EWOULDBLOCK && errno != EINTR &&
+ errno != ECONNABORTED)
+ syslog(LOG_WARNING, "accept (for %s): %m",
+ sep->se_service);
return -1;
}
if ((sep->se_family == AF_INET || sep->se_family == AF_INET6) &&
diff --git a/usr.sbin/iscsid/control.c b/usr.sbin/iscsid/control.c
index 1621a576339..ba75afa31e3 100644
--- a/usr.sbin/iscsid/control.c
+++ b/usr.sbin/iscsid/control.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: control.c,v 1.3 2012/04/11 08:16:37 claudio Exp $ */
+/* $OpenBSD: control.c,v 1.4 2013/03/11 17:40:11 deraadt Exp $ */
/*
* Copyright (c) 2010 Claudio Jeker <claudio@openbsd.org>
@@ -165,7 +165,8 @@ control_accept(int listenfd, short event, void *bula)
event_del(&control_state->ev);
evtimer_add(&control_state->evt, &evtpause);
- } else if (errno != EWOULDBLOCK && errno != EINTR)
+ } else if (errno != EWOULDBLOCK && errno != EINTR &&
+ errno != ECONNABORTED)
log_warn("control_accept");
return;
}
diff --git a/usr.sbin/ldpd/control.c b/usr.sbin/ldpd/control.c
index 5a14a802977..7b6aa47dcea 100644
--- a/usr.sbin/ldpd/control.c
+++ b/usr.sbin/ldpd/control.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: control.c,v 1.10 2012/04/12 17:33:43 claudio Exp $ */
+/* $OpenBSD: control.c,v 1.11 2013/03/11 17:40:11 deraadt Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -120,7 +120,8 @@ control_accept(int listenfd, short event, void *bula)
*/
if (errno == ENFILE || errno == EMFILE)
accept_pause();
- else if (errno != EWOULDBLOCK && errno != EINTR)
+ else if (errno != EWOULDBLOCK && errno != EINTR &&
+ errno != ECONNABORTED)
log_warn("control_accept: accept");
return;
}
diff --git a/usr.sbin/ldpd/packet.c b/usr.sbin/ldpd/packet.c
index 5a5880d162f..1d3ca1ff953 100644
--- a/usr.sbin/ldpd/packet.c
+++ b/usr.sbin/ldpd/packet.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: packet.c,v 1.16 2012/04/12 17:33:43 claudio Exp $ */
+/* $OpenBSD: packet.c,v 1.17 2013/03/11 17:40:11 deraadt Exp $ */
/*
* Copyright (c) 2009 Michele Marchetto <michele@openbsd.org>
@@ -268,7 +268,8 @@ session_accept(int fd, short event, void *bula)
*/
if (errno == ENFILE || errno == EMFILE) {
accept_pause();
- } else if (errno != EWOULDBLOCK && errno != EINTR)
+ } else if (errno != EWOULDBLOCK && errno != EINTR &&
+ errno != ECONNABORTED)
log_debug("sess_recv_packet: accept error: %s",
strerror(errno));
return;
diff --git a/usr.sbin/lpr/lpd/lpd.c b/usr.sbin/lpr/lpd/lpd.c
index 9995eb222ad..076bc806e84 100644
--- a/usr.sbin/lpr/lpd/lpd.c
+++ b/usr.sbin/lpr/lpd/lpd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lpd.c,v 1.50 2009/10/27 23:59:52 deraadt Exp $ */
+/* $OpenBSD: lpd.c,v 1.51 2013/03/11 17:40:11 deraadt Exp $ */
/* $NetBSD: lpd.c,v 1.33 2002/01/21 14:42:29 wiz Exp $ */
/*
@@ -387,7 +387,8 @@ main(int argc, char **argv)
}
}
if (s < 0) {
- if (errno != EINTR)
+ if (errno != EINTR && errno != EWOULDBLOCK &&
+ errno != ECONNABORTED)
syslog(LOG_WARNING, "accept: %m");
continue;
}
diff --git a/usr.sbin/npppd/pptp/pptpd.c b/usr.sbin/npppd/pptp/pptpd.c
index 4682d175492..e6a407697bc 100644
--- a/usr.sbin/npppd/pptp/pptpd.c
+++ b/usr.sbin/npppd/pptp/pptpd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pptpd.c,v 1.13 2013/03/11 09:28:02 giovanni Exp $ */
+/* $OpenBSD: pptpd.c,v 1.14 2013/03/11 17:40:11 deraadt Exp $ */
/*-
* Copyright (c) 2009 Internet Initiative Japan Inc.
@@ -25,12 +25,12 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
-/* $Id: pptpd.c,v 1.13 2013/03/11 09:28:02 giovanni Exp $ */
+/* $Id: pptpd.c,v 1.14 2013/03/11 17:40:11 deraadt Exp $ */
/**@file
* This file provides a implementation of PPTP daemon. Currently it
* provides functions for PAC (PPTP Access Concentrator) only.
- * $Id: pptpd.c,v 1.13 2013/03/11 09:28:02 giovanni Exp $
+ * $Id: pptpd.c,v 1.14 2013/03/11 17:40:11 deraadt Exp $
*/
#include <sys/types.h>
#include <sys/param.h>
@@ -646,7 +646,8 @@ pptpd_io_event(int fd, short evmask, void *ctx)
(struct sockaddr *)&peer, &peerlen)) < 0) {
if (errno == EMFILE || errno == ENFILE)
accept_pause();
- else if (errno != EAGAIN && errno != EINTR) {
+ else if (errno != EAGAIN && errno != EINTR &&
+ errno != ECONNABORTED) {
pptpd_log(_this, LOG_ERR,
"accept() failed at %s(): %m",
__func__);
diff --git a/usr.sbin/ospf6d/control.c b/usr.sbin/ospf6d/control.c
index 4bf2c4be8e2..5404373cfb1 100644
--- a/usr.sbin/ospf6d/control.c
+++ b/usr.sbin/ospf6d/control.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: control.c,v 1.18 2012/04/11 08:33:53 deraadt Exp $ */
+/* $OpenBSD: control.c,v 1.19 2013/03/11 17:40:11 deraadt Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -132,7 +132,8 @@ control_accept(int listenfd, short event, void *bula)
event_del(&control_state.ev);
evtimer_add(&control_state.evt, &evtpause);
- } else if (errno != EWOULDBLOCK && errno != EINTR)
+ } else if (errno != EWOULDBLOCK && errno != EINTR &&
+ errno != ECONNABORTED)
log_warn("control_accept: accept");
return;
}
diff --git a/usr.sbin/ospfd/control.c b/usr.sbin/ospfd/control.c
index a5d75a4bd34..35d9c1f3359 100644
--- a/usr.sbin/ospfd/control.c
+++ b/usr.sbin/ospfd/control.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: control.c,v 1.37 2012/04/11 08:33:53 deraadt Exp $ */
+/* $OpenBSD: control.c,v 1.38 2013/03/11 17:40:11 deraadt Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -135,7 +135,8 @@ control_accept(int listenfd, short event, void *bula)
event_del(&control_state.ev);
evtimer_add(&control_state.evt, &evtpause);
- } else if (errno != EWOULDBLOCK && errno != EINTR)
+ } else if (errno != EWOULDBLOCK && errno != EINTR &&
+ errno != ECONNABORTED)
log_warn("control_accept: accept");
return;
}
diff --git a/usr.sbin/ppp/ppp/server.c b/usr.sbin/ppp/ppp/server.c
index 38705261ba3..65f2b96f387 100644
--- a/usr.sbin/ppp/ppp/server.c
+++ b/usr.sbin/ppp/ppp/server.c
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $OpenBSD: server.c,v 1.18 2006/09/25 05:59:28 otto Exp $
+ * $OpenBSD: server.c,v 1.19 2013/03/11 17:40:11 deraadt Exp $
*/
#include <sys/param.h>
@@ -101,9 +101,11 @@ server_Read(struct fdescriptor *d, struct bundle *bundle, const fd_set *fdset)
if (s->fd >= 0 && FD_ISSET(s->fd, fdset)) {
wfd = accept(s->fd, sa, &ssize);
- if (wfd < 0)
- log_Printf(LogERROR, "server_Read: accept(): %s\n", strerror(errno));
- else if (sa->sa_len == 0) {
+ if (wfd < 0) {
+ if (errno != EINTR && errno != EWOULDBLOCK &&
+ errno != ECONNABORTED)
+ log_Printf(LogERROR, "server_Read: accept(): %s\n", strerror(errno));
+ } else if (sa->sa_len == 0) {
close(wfd);
wfd = -1;
}
diff --git a/usr.sbin/relayd/control.c b/usr.sbin/relayd/control.c
index 275dd925713..e3046f1a7e6 100644
--- a/usr.sbin/relayd/control.c
+++ b/usr.sbin/relayd/control.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: control.c,v 1.43 2012/04/19 14:48:44 deraadt Exp $ */
+/* $OpenBSD: control.c,v 1.44 2013/03/11 17:40:11 deraadt Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -159,7 +159,8 @@ control_accept(int listenfd, short event, void *arg)
event_del(&cs->cs_ev);
evtimer_add(&cs->cs_evt, &evtpause);
- } else if (errno != EWOULDBLOCK && errno != EINTR)
+ } else if (errno != EWOULDBLOCK && errno != EINTR &&
+ errno != ECONNABORTED)
log_warn("%s: accept", __func__);
return;
}
diff --git a/usr.sbin/ripd/control.c b/usr.sbin/ripd/control.c
index 2cc7bf596b3..013192517f3 100644
--- a/usr.sbin/ripd/control.c
+++ b/usr.sbin/ripd/control.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: control.c,v 1.17 2012/04/11 08:33:53 deraadt Exp $ */
+/* $OpenBSD: control.c,v 1.18 2013/03/11 17:40:11 deraadt Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -133,7 +133,8 @@ control_accept(int listenfd, short event, void *bula)
event_del(&control_state.ev);
evtimer_add(&control_state.evt, &evtpause);
- } else if (errno != EWOULDBLOCK && errno != EINTR)
+ } else if (errno != EWOULDBLOCK && errno != EINTR &&
+ errno != ECONNABORTED)
log_warn("control_accept: accept");
return;
}
diff --git a/usr.sbin/sasyncd/net.c b/usr.sbin/sasyncd/net.c
index 911b7cd1e3d..9f6e15bc58e 100644
--- a/usr.sbin/sasyncd/net.c
+++ b/usr.sbin/sasyncd/net.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: net.c,v 1.19 2012/04/15 03:25:27 jsg Exp $ */
+/* $OpenBSD: net.c,v 1.20 2013/03/11 17:40:11 deraadt Exp $ */
/*
* Copyright (c) 2005 Håkan Olsson. All rights reserved.
@@ -511,7 +511,8 @@ net_accept(int accept_socket)
"socket, closing.");
close(s);
}
- } else
+ } else if (errno != EWOULDBLOCK && errno != EINTR &&
+ errno != ECONNABORTED)
log_err("net: accept()");
}
diff --git a/usr.sbin/smtpd/control.c b/usr.sbin/smtpd/control.c
index a697ee7a489..b28bba91325 100644
--- a/usr.sbin/smtpd/control.c
+++ b/usr.sbin/smtpd/control.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: control.c,v 1.82 2013/01/26 09:37:23 gilles Exp $ */
+/* $OpenBSD: control.c,v 1.83 2013/03/11 17:40:11 deraadt Exp $ */
/*
* Copyright (c) 2012 Gilles Chehade <gilles@poolp.org>
@@ -308,7 +308,8 @@ control_accept(int listenfd, short event, void *arg)
if ((connfd = accept(listenfd, (struct sockaddr *)&sun, &len)) == -1) {
if (errno == ENFILE || errno == EMFILE)
goto pause;
- if (errno == EINTR || errno == ECONNABORTED)
+ if (errno == EINTR || errno == EWOULDBLOCK ||
+ errno == ECONNABORTED)
return;
fatal("control_accept: accept");
}
diff --git a/usr.sbin/smtpd/smtp.c b/usr.sbin/smtpd/smtp.c
index 635c1b32e7d..0874c38b272 100644
--- a/usr.sbin/smtpd/smtp.c
+++ b/usr.sbin/smtpd/smtp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: smtp.c,v 1.123 2013/01/26 09:37:23 gilles Exp $ */
+/* $OpenBSD: smtp.c,v 1.124 2013/03/11 17:40:11 deraadt Exp $ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@poolp.org>
@@ -418,7 +418,8 @@ smtp_accept(int fd, short event, void *p)
log_warn("warn: Disabling incoming SMTP connections");
goto pause;
}
- if (errno == EINTR || errno == ECONNABORTED)
+ if (errno == EINTR || errno == EWOULDBLOCK ||
+ errno == ECONNABORTED)
return;
fatal("smtp_accept");
}
diff --git a/usr.sbin/snmpd/control.c b/usr.sbin/snmpd/control.c
index 29cba914e62..f508d6bf56b 100644
--- a/usr.sbin/snmpd/control.c
+++ b/usr.sbin/snmpd/control.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: control.c,v 1.17 2012/11/29 14:53:24 yasuoka Exp $ */
+/* $OpenBSD: control.c,v 1.18 2013/03/11 17:40:11 deraadt Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -157,7 +157,8 @@ control_accept(int listenfd, short event, void *arg)
event_del(&cs->cs_ev);
evtimer_add(&cs->cs_evt, &evtpause);
- } else if (errno != EWOULDBLOCK && errno != EINTR)
+ } else if (errno != EWOULDBLOCK && errno != EINTR &&
+ errno != ECONNABORTED)
log_warn("control_accept: accept");
return;
}
diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c
index d9ad7c72f8e..175a52a337c 100644
--- a/usr.sbin/syslogd/syslogd.c
+++ b/usr.sbin/syslogd/syslogd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: syslogd.c,v 1.105 2013/02/10 10:47:08 markus Exp $ */
+/* $OpenBSD: syslogd.c,v 1.106 2013/03/11 17:40:11 deraadt Exp $ */
/*
* Copyright (c) 1983, 1988, 1993, 1994
@@ -1805,7 +1805,8 @@ ctlsock_accept_handler(void)
dprintf("Accepting control connection\n");
fd = accept(pfd[PFD_CTLSOCK].fd, NULL, NULL);
if (fd == -1) {
- if (errno != EINTR && errno != ECONNABORTED)
+ if (errno != EINTR && errno != EWOULDBLOCK &&
+ errno != ECONNABORTED)
logerror("accept ctlsock");
return;
}