]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
add configure --enable-ignore-dns-errors to retry on any failure
authorDave Hart <hart@ntp.org>
Fri, 8 May 2009 17:50:37 +0000 (17:50 +0000)
committerDave Hart <hart@ntp.org>
Fri, 8 May 2009 17:50:37 +0000 (17:50 +0000)
bk: 4a0470ed7l5ChPhi4R_bK7YRsxmXlQ

ChangeLog
configure.ac
ntpd/ntp_intres.c

index a6870fb1461ccf8c9e21de0663923aec95a9f056..14cf6014d1a4638e448a1d73814a84059a951bac 100644 (file)
--- 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 <stenn@ntp.org>
index 94920c5cd486906e8f95456be0aafbf89decb6b5..294d9647c90181976fca2994d6f5c326eccfd556 100644 (file)
@@ -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
index b698facf2e5ab8a631ede6804d13113f0c6944ef..5facc85693c4c2d7bccaad2e7e17585a578de967 100644 (file)
@@ -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
                        }
                }