diff options
author | 2005-03-08 14:59:36 +0000 | |
---|---|---|
committer | 2005-03-08 14:59:36 +0000 | |
commit | 96959c711bb779b8c4fb0934fe422742f33d65f6 (patch) | |
tree | 53fa454ce70a26da9a52ce67cefe480449e07b25 | |
parent | make this compile on strict-alignment architectures. someone send (diff) | |
download | wireguard-openbsd-96959c711bb779b8c4fb0934fe422742f33d65f6.tar.xz wireguard-openbsd-96959c711bb779b8c4fb0934fe422742f33d65f6.zip |
from the "shut the fuck up, ntpd" department:
don't whine about temporary dns errors
-rw-r--r-- | usr.sbin/ntpd/config.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/usr.sbin/ntpd/config.c b/usr.sbin/ntpd/config.c index bd5a49eb83d..03849d08618 100644 --- a/usr.sbin/ntpd/config.c +++ b/usr.sbin/ntpd/config.c @@ -1,4 +1,4 @@ -/* $OpenBSD: config.c,v 1.15 2004/12/16 00:38:59 dtucker Exp $ */ +/* $OpenBSD: config.c,v 1.16 2005/03/08 14:59:36 henning Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -123,14 +123,12 @@ host_dns(const char *s, struct ntp_addr **hn) hints.ai_socktype = SOCK_DGRAM; /* DUMMY */ res_init(); /* XXX */ error = getaddrinfo(s, NULL, &hints, &res0); + if (error == EAI_AGAIN || error == EAI_NODATA || error == EAI_NONAME) + return (0); if (error) { log_warnx("could not parse \"%s\": %s", s, gai_strerror(error)); - if (error == EAI_AGAIN || error == EAI_NODATA || - error == EAI_NONAME) - return (0); - else - return (-1); + return (-1); } for (res = res0; res && cnt < MAX_SERVERS_DNS; res = res->ai_next) { |