[ntpsec commit] Implement --disable_dns_retry optiion.

Eric S. Raymond esr at ntpsec.org
Sat Oct 3 13:43:08 UTC 2015


Module:    ntpsec
Branch:    master
Commit:    65c3d7ef82a5eaff95b0d029ee85d4f41c8926fb
Changeset: http://git.ntpsec.org/ntpsec/commit/?id=65c3d7ef82a5eaff95b0d029ee85d4f41c8926fb

Author:    Eric S. Raymond <esr at thyrsus.com>
Date:      Sat Oct  3 08:00:35 2015 -0400

Implement --disable_dns_retry optiion.

---

 ntpd/ntp_config.c  | 4 ++--
 pylib/configure.py | 3 +++
 wscript            | 1 +
 3 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/ntpd/ntp_config.c b/ntpd/ntp_config.c
index 6c877aa..c03e7ce 100644
--- a/ntpd/ntp_config.c
+++ b/ntpd/ntp_config.c
@@ -3824,12 +3824,12 @@ peer_name_resolved(
 	DPRINTF(1, ("peer_name_resolved(%s) rescode %d\n", name, rescode));
 
 	if (rescode) {
-#ifndef IGNORE_DNS_ERRORS
+#ifndef ENABLE_DNS_RETRY
 		free(ctx);
 		msyslog(LOG_ERR,
 			"giving up resolving host %s: %s (%d)",
 			name, gai_strerror(rescode), rescode);
-#else	/* IGNORE_DNS_ERRORS follows */
+#else	/* ENABLE_DNS_RETRY follows */
 		getaddrinfo_sometime(name, service, hints,
 				     INITIAL_DNS_RETRY,
 				     &peer_name_resolved, context);
diff --git a/pylib/configure.py b/pylib/configure.py
index 77096d0..933da64 100644
--- a/pylib/configure.py
+++ b/pylib/configure.py
@@ -323,6 +323,9 @@ def cmd_configure(ctx):
 	if not ctx.options.disable_dns_lookup:
 		ctx.define("ENABLE_DNS_LOOKUP", 1)
 
+	if not ctx.options.disable_dns_retry:
+		ctx.define("ENABLE_DNS_RETRY", 1)
+
 	if not ctx.options.disable_mdns_registration:
 		from check_mdns import check_mdns
 		check_mdns(ctx)
diff --git a/wscript b/wscript
index e85ed2d..81cc47f 100644
--- a/wscript
+++ b/wscript
@@ -43,6 +43,7 @@ def options(ctx):
 	grp.add_option('--enable-crypto', action='store_true', default=False, help="Enable OpenSSL.")
 	grp.add_option('--disable-droproot', action='store_true', default=False, help="Disable dropping root.")
 	grp.add_option('--disable-dns-lookup', action='store_true', default=False, help="Disable DNS lookups.")
+	grp.add_option('--disable-dns-retry', action='store_true', default=False, help="Disable DNS lookups.")
 	grp.add_option('--disable-mdns-registration', action='store_true', default=False, help="Disable DNS lookups.")
 
 



More information about the vc mailing list