diff options
Diffstat (limited to 'usr.sbin/ntpd/server.c')
-rw-r--r-- | usr.sbin/ntpd/server.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/usr.sbin/ntpd/server.c b/usr.sbin/ntpd/server.c index 25fdb861b75..fc1525e51da 100644 --- a/usr.sbin/ntpd/server.c +++ b/usr.sbin/ntpd/server.c @@ -1,4 +1,4 @@ -/* $OpenBSD: server.c,v 1.11 2004/07/14 20:16:31 henning Exp $ */ +/* $OpenBSD: server.c,v 1.12 2004/07/18 13:26:53 henning Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -105,8 +105,15 @@ server_dispatch(int fd, struct ntpd_conf *conf) fsa_len = sizeof(fsa); if ((size = recvfrom(fd, &buf, sizeof(buf), 0, - (struct sockaddr *)&fsa, &fsa_len)) == -1) - fatal("recvfrom"); + (struct sockaddr *)&fsa, &fsa_len)) == -1) { + if (errno == EHOSTUNREACH || errno == EHOSTDOWN || + errno == ENETDOWN) { + log_warn("recvfrom %s", + log_sockaddr((struct sockaddr *)&fsa)); + return (0); + } else + fatal("recvfrom"); + } rectime = gettime(); |