diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2005-03-08 14:59:37 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2005-03-08 14:59:37 +0000 |
commit | 07cd95d987e97a7ece38097c7315c397bbbf2cc9 (patch) | |
tree | 01a51f6586aeb5bfa9f4b6829400409ca6f33188 /usr.sbin | |
parent | dc5ba7d98c5258e12986058d6c8fda0d728b2aa7 (diff) |
from the "shut the fuck up, ntpd" department:
don't whine about temporary dns errors
Diffstat (limited to 'usr.sbin')
-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) { |