diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2004-07-28 16:38:44 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2004-07-28 16:38:44 +0000 |
commit | 3830e438390177887b924a22ac8b72d2a260d3cd (patch) | |
tree | fbeb4dd91068bbe52ec2f94ecd74142a7de61a72 /usr.sbin/ntpd/parse.y | |
parent | 13285dc3dbfd6bb612fffa9c3c22f1ee25391384 (diff) |
when a dns lookup fails at parse time, do not abort but try again
to resolve the hostname every 60 seconds
fixes ntpd invocations before e. g. a dialup link is established and such.
as we want ntpd to be a "fire and forget" background daemon it should
cope with such situations.
tested by many
Diffstat (limited to 'usr.sbin/ntpd/parse.y')
-rw-r--r-- | usr.sbin/ntpd/parse.y | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/ntpd/parse.y b/usr.sbin/ntpd/parse.y index 7efb7fc80a7..0baa4383b57 100644 --- a/usr.sbin/ntpd/parse.y +++ b/usr.sbin/ntpd/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.14 2004/07/21 09:40:55 henning Exp $ */ +/* $OpenBSD: parse.y,v 1.15 2004/07/28 16:38:43 henning Exp $ */ /* * Copyright (c) 2002, 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -211,7 +211,7 @@ address : STRING { if (($$ = calloc(1, sizeof(struct ntp_addr_wrap))) == NULL) fatal(NULL); - if (($$->a = host($1)) == NULL) { + if (host($1, &$$->a) == -1) { yyerror("could not parse address spec \"%s\"", $1); free($1); |