summaryrefslogtreecommitdiffstats
path: root/usr.sbin/inetd
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2013-03-11 17:40:09 +0000
committerderaadt <deraadt@openbsd.org>2013-03-11 17:40:09 +0000
commit62e3c2528255beec34fe0acd77e74b042a0926c6 (patch)
tree1c7e4070f2f682e9d9017be26794ca4197437d0e /usr.sbin/inetd
parentWhen binding a lease, check for and clear out any 'zombie' routes (diff)
downloadwireguard-openbsd-62e3c2528255beec34fe0acd77e74b042a0926c6.tar.xz
wireguard-openbsd-62e3c2528255beec34fe0acd77e74b042a0926c6.zip
handle ECONNABORTED errors from accept(). In many code blocks they can be
ignored silently and without aborting, much like EINTR and EWOULDBLOCK are. ok's from various maintainers of these directories...
Diffstat (limited to 'usr.sbin/inetd')
-rw-r--r--usr.sbin/inetd/inetd.c9
1 files changed, 5 insertions, 4 deletions
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) &&