summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>1998-10-31 06:36:51 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>1998-10-31 06:36:51 +0000
commit3acc783f4f7bc3809295a0dcebb974adec1b4b53 (patch)
treedd56993c04faad5a8a776be3c4389ef1aca23117 /usr.sbin
parent6b2a1c68ae261f9418c63985441e14381a10cd12 (diff)
Catch other cases where the accept(2) can fail.
Works around a DOS attack noted by Michal Zalewski <lcamtuf@IDS.PL>. Patch by Nick Andrew <nick@ZETA.ORG.AU>.
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/sendmail/src/daemon.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/sendmail/src/daemon.c b/usr.sbin/sendmail/src/daemon.c
index dc0b5b5bd2d..1e1c2d308fe 100644
--- a/usr.sbin/sendmail/src/daemon.c
+++ b/usr.sbin/sendmail/src/daemon.c
@@ -293,7 +293,8 @@ getrequests(e)
lotherend = socksize;
t = accept(DaemonSocket,
(struct sockaddr *)&RealHostAddr, &lotherend);
- if (t >= 0 || errno != EINTR)
+ if (t >= 0 || (errno != EINTR && errno != ENETUNREACH
+ && errno != EHOSTUNREACH))
break;
}
savederrno = errno;