diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 1998-10-31 06:36:51 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 1998-10-31 06:36:51 +0000 |
commit | 3acc783f4f7bc3809295a0dcebb974adec1b4b53 (patch) | |
tree | dd56993c04faad5a8a776be3c4389ef1aca23117 /usr.sbin | |
parent | 6b2a1c68ae261f9418c63985441e14381a10cd12 (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.c | 3 |
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; |