From: Dave Hart Date: Fri, 8 May 2009 17:50:37 +0000 (+0000) Subject: add configure --enable-ignore-dns-errors to retry on any failure X-Git-Tag: NTP_4_2_4P7_RC7~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8885773890d64890bbbead7526c72dc37aa9c5e9;p=thirdparty%2Fntp.git add configure --enable-ignore-dns-errors to retry on any failure bk: 4a0470ed7l5ChPhi4R_bK7YRsxmXlQ --- diff --git a/ChangeLog b/ChangeLog index a6870fb14..14cf6014d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,7 @@ --- -* [Bug 1178] Use prior FORCE_DNSRETRY behavior as needed at runtime +* [Bug 1178] Use prior FORCE_DNSRETRY behavior as needed at runtime, + add configure --enable-ignore-dns-errors to be even more stubborn --- (4.2.4p7-RC6) 2009/05/08 Released by Harlan Stenn diff --git a/configure.ac b/configure.ac index 94920c5cd..294d9647c 100644 --- a/configure.ac +++ b/configure.ac @@ -7,7 +7,7 @@ AC_CANONICAL_HOST dnl the 'build' machine is where we run configure and compile dnl the 'host' machine is where the resulting stuff runs. AC_DEFINE_UNQUOTED(STR_SYSTEM, "$host", [canonical system (cpu-vendor-os) of where we should run]) -AM_CONFIG_HEADER(config.h) +AM_CONFIG_HEADER([config.h]) dnl AC_ARG_PROGRAM AC_PREREQ(2.53) @@ -1998,12 +1998,34 @@ fi AC_MSG_RESULT($ntp_ok) AC_MSG_CHECKING([for a the number of minutes in a DST adjustment]) -AC_ARG_ENABLE(dst_minutes, - AC_HELP_STRING([--enable-dst-minutes=60], [+ minutes per DST adjustment]), - [ans=$enableval], [ans=60]) +AC_ARG_ENABLE( + [dst_minutes], + AS_HELP_STRING( + [--enable-dst-minutes], + [ minutes per DST adjustment @<:@60@:>@] dnl @<:@ is [ + ), + [ans=$enableval], + [ans=60] +) AC_DEFINE_UNQUOTED(DSTMINUTES, $ans, [The number of minutes in a DST adjustment]) AC_MSG_RESULT([$ans]) +AC_MSG_CHECKING([[if ntpd will retry on permanent DNS errors]]) +AC_ARG_ENABLE( + [ignore-dns-errors], + AS_HELP_STRING( + [--enable-ignore-dns-errors], + [- retry DNS queries on any error] + ), + [ans=$enableval], + [ans=no] +) +case "$ans" in + yes) + AC_DEFINE(IGNORE_DNS_ERRORS, 1, [[Retry queries on _any_ DNS error?]]) +esac +AC_MSG_RESULT([$ans]) + AC_CACHE_CHECK([if we have the tty_clk line discipline/streams module], ac_cv_var_tty_clk, [case "$ac_cv_header_sys_clkdefs_h$ac_cv_hdr_def_tiocdcdtimestamp" in diff --git a/ntpd/ntp_intres.c b/ntpd/ntp_intres.c index b698facf2..5facc8569 100644 --- a/ntpd/ntp_intres.c +++ b/ntpd/ntp_intres.c @@ -1139,6 +1139,7 @@ doconfigure( #endif if (dores && SOCKNUL(&(ce->peer_store))) { if (!findhostaddr(ce)) { +#ifndef IGNORE_DNS_ERRORS msyslog(LOG_ERR, "couldn't resolve `%s', giving up on it", ce->ce_name); @@ -1146,6 +1147,7 @@ doconfigure( ce = ceremove->ce_next; removeentry(ceremove); continue; +#endif } }