diff options
author | Otto Moerbeek <otto@cvs.openbsd.org> | 2019-06-16 07:36:26 +0000 |
---|---|---|
committer | Otto Moerbeek <otto@cvs.openbsd.org> | 2019-06-16 07:36:26 +0000 |
commit | e754919bebf986fd24de1f0283616f8c980980b2 (patch) | |
tree | cc665ac9e517ca550709b808083800a72d76ae86 /usr.sbin/ntpd/client.c | |
parent | 811eba79439731529d58eb77401b4f73e787dd31 (diff) |
Be more aggressive retrying dns while in settime mode. The constraint
engine does not know if we're in startup mode, so use a small interval
the first few times there.
Diffstat (limited to 'usr.sbin/ntpd/client.c')
-rw-r--r-- | usr.sbin/ntpd/client.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/usr.sbin/ntpd/client.c b/usr.sbin/ntpd/client.c index 990d34b0b70..4566b59cacf 100644 --- a/usr.sbin/ntpd/client.c +++ b/usr.sbin/ntpd/client.c @@ -1,4 +1,4 @@ -/* $OpenBSD: client.c,v 1.107 2019/06/09 08:40:54 otto Exp $ */ +/* $OpenBSD: client.c,v 1.108 2019/06/16 07:36:25 otto Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -129,8 +129,11 @@ client_query(struct ntp_peer *p) int val; if (p->addr == NULL && client_nextaddr(p) == -1) { - set_next(p, MAXIMUM(SETTIME_TIMEOUT, - scale_interval(INTERVAL_QUERY_AGGRESSIVE))); + if (conf->settime) + set_next(p, INTERVAL_AUIO_DNSFAIL); + else + set_next(p, MAXIMUM(SETTIME_TIMEOUT, + scale_interval(INTERVAL_QUERY_AGGRESSIVE))); return (0); } |