diff options
author | Darren Tucker <dtucker@cvs.openbsd.org> | 2005-01-28 12:01:33 +0000 |
---|---|---|
committer | Darren Tucker <dtucker@cvs.openbsd.org> | 2005-01-28 12:01:33 +0000 |
commit | 6dbbb73e53860513b447b13c5158269052db989b (patch) | |
tree | 3ba121314f11c80ee39487833447279257763c97 /usr.sbin | |
parent | 6ec73c7829514c037e3e07d21198be80533266f6 (diff) |
Make network unreachable errors non-fatal; ok henning@
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/ntpd/client.c | 5 | ||||
-rw-r--r-- | usr.sbin/ntpd/server.c | 4 |
2 files changed, 5 insertions, 4 deletions
diff --git a/usr.sbin/ntpd/client.c b/usr.sbin/ntpd/client.c index 0016488a604..938afbabb18 100644 --- a/usr.sbin/ntpd/client.c +++ b/usr.sbin/ntpd/client.c @@ -1,4 +1,4 @@ -/* $OpenBSD: client.c,v 1.53 2005/01/27 14:44:00 dtucker Exp $ */ +/* $OpenBSD: client.c,v 1.54 2005/01/28 12:01:32 dtucker Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -180,7 +180,8 @@ client_dispatch(struct ntp_peer *p, u_int8_t settime) if ((size = recvfrom(p->query->fd, &buf, sizeof(buf), 0, NULL, NULL)) == -1) { if (errno == EHOSTUNREACH || errno == EHOSTDOWN || - errno == ENETDOWN || errno == ECONNREFUSED) { + errno == ENETUNREACH || errno == ENETDOWN || + errno == ECONNREFUSED) { log_warn("recvfrom %s", log_sockaddr((struct sockaddr *)&p->addr->ss)); set_next(p, error_interval()); diff --git a/usr.sbin/ntpd/server.c b/usr.sbin/ntpd/server.c index 2a88d9c2a85..1e2d536d05f 100644 --- a/usr.sbin/ntpd/server.c +++ b/usr.sbin/ntpd/server.c @@ -1,4 +1,4 @@ -/* $OpenBSD: server.c,v 1.20 2004/12/22 05:36:11 dtucker Exp $ */ +/* $OpenBSD: server.c,v 1.21 2005/01/28 12:01:32 dtucker Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -112,7 +112,7 @@ server_dispatch(int fd, struct ntpd_conf *conf) if ((size = recvfrom(fd, &buf, sizeof(buf), 0, (struct sockaddr *)&fsa, &fsa_len)) == -1) { if (errno == EHOSTUNREACH || errno == EHOSTDOWN || - errno == ENETDOWN) { + errno == ENETUNREACH || errno == ENETDOWN) { log_warn("recvfrom %s", log_sockaddr((struct sockaddr *)&fsa)); return (0); |