From: Amos Jeffries Date: Sat, 9 Aug 2008 06:24:33 +0000 (+1200) Subject: Bug 2379: obsolete dns_testnames option X-Git-Tag: SQUID_3_1_0_1~49^2~102 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8eb28163c0f4a842e4ad80d5c3907d17e3dcbf64;p=thirdparty%2Fsquid.git Bug 2379: obsolete dns_testnames option Removes the dns_testnames squid.conf option and all related code. Obsoletes -D command line option which existed only for the purpose of turning dns_testnames off. Scheduled for absolute removal in Squid 3.2. But should be assumed as non-existing from 3.1 onwards. --- diff --git a/doc/release-notes/release-3.1.sgml b/doc/release-notes/release-3.1.sgml index ce56d65430..58aeaa1bf6 100644 --- a/doc/release-notes/release-3.1.sgml +++ b/doc/release-notes/release-3.1.sgml @@ -302,6 +302,9 @@ This section gives a thorough account of those changes in three categories:

+ dns_testnames +

Obsolete. This feature is no longer relevant to modern networks and causes boot problems.

+ diff --git a/src/cf.data.pre b/src/cf.data.pre index 086e1b71df..ffe0606602 100644 --- a/src/cf.data.pre +++ b/src/cf.data.pre @@ -5464,17 +5464,6 @@ DOC_START definitions. DOC_END -NAME: dns_testnames -TYPE: wordlist -LOC: Config.dns_testname_list -DEFAULT: none -DEFAULT_IF_NONE: netscape.com internic.net nlanr.net microsoft.com -DOC_START - The DNS tests exit as soon as the first site is successfully looked up - - This test can be disabled with the -D command line option. -DOC_END - NAME: append_domain TYPE: string LOC: Config.appendDomain diff --git a/src/globals.h b/src/globals.h index 27c2e20977..3af974ff11 100644 --- a/src/globals.h +++ b/src/globals.h @@ -95,7 +95,6 @@ extern "C" extern int neighbors_do_private_keys; /* 1 */ extern int opt_catch_signals; /* 1 */ extern int opt_debug_stderr; /* -1 */ - extern int opt_dns_tests; /* 1 */ extern int opt_foreground_rebuild; /* 0 */ extern char *opt_forwarded_for; /* NULL */ extern int opt_reload_hit_only; /* 0 */ diff --git a/src/ipcache.cc b/src/ipcache.cc index ff8e07e06b..4a653029a7 100644 --- a/src/ipcache.cc +++ b/src/ipcache.cc @@ -142,7 +142,6 @@ static IDNSCB ipcacheHandleReply; #endif static IPH ipcacheHandleCnameRecurse; static int ipcacheExpiredEntry(ipcache_entry *); -static int ipcache_testname(void); #if USE_DNSSERVERS static int ipcacheParse(ipcache_entry *, const char *buf); #else @@ -168,24 +167,6 @@ static long ipcache_high = 200; extern int _dns_ttl_; #endif -/// \ingroup IPCacheInternal -static int -ipcache_testname(void) -{ - wordlist *w = NULL; - debugs(14, 1, "Performing DNS Tests..."); - - if ((w = Config.dns_testname_list) == NULL) - return 1; - - for (; w; w = w->next) { - if (gethostbyname(w->key) != NULL) - return 1; - } - - return 0; -} - /** \ingroup IPCacheInternal * @@ -792,19 +773,9 @@ void ipcache_init(void) { int n; - debugs(14, 3, "Initializing IP Cache..."); + debugs(14, DBG_IMPORTANT, "Initializing IP Cache..."); memset(&IpcacheStats, '\0', sizeof(IpcacheStats)); memset(&lru_list, '\0', sizeof(lru_list)); - /* test naming lookup */ - - if (!opt_dns_tests) { - debugs(14, 4, "ipcache_init: Skipping DNS name lookup tests."); - } else if (!ipcache_testname()) { - fatal("ipcache_init: DNS name lookup tests failed."); - } else { - debugs(14, 1, "Successful DNS name lookup tests..."); - } - memset(&static_addrs, '\0', sizeof(ipcache_addrs)); static_addrs.in_addrs = (IPAddress *)xcalloc(1, sizeof(IPAddress)); diff --git a/src/main.cc b/src/main.cc index f28d3dfecd..e98c479426 100644 --- a/src/main.cc +++ b/src/main.cc @@ -207,9 +207,9 @@ usage(void) { fprintf(stderr, #if USE_WIN32_SERVICE - "Usage: %s [-cdhirvzCDFNRVYX] [-s | -l facility] [-f config-file] [-[au] port] [-k signal] [-n name] [-O CommandLine]\n" + "Usage: %s [-cdhirvzCFNRVYX] [-s | -l facility] [-f config-file] [-[au] port] [-k signal] [-n name] [-O CommandLine]\n" #else - "Usage: %s [-cdhvzCDFNRVYX] [-s | -l facility] [-f config-file] [-[au] port] [-k signal]\n" + "Usage: %s [-cdhvzCFNRVYX] [-s | -l facility] [-f config-file] [-[au] port] [-k signal]\n" #endif " -a port Specify HTTP port number (default: %d).\n" " -d level Write debugging to stderr also.\n" @@ -233,7 +233,7 @@ usage(void) " -v Print version.\n" " -z Create swap directories\n" " -C Do not catch fatal signals.\n" - " -D Disable initial DNS tests.\n" + " -D OBSOLETE. Scheduled for removal.\n" " -F Don't serve any requests until store is rebuilt.\n" " -N No daemon mode.\n" #if USE_WIN32_SERVICE @@ -279,8 +279,8 @@ mainParseOptions(int argc, char *argv[]) case 'D': /** \par D - * Unset/disable global option for optional DNS tests. opt_dns_tests */ - opt_dns_tests = 0; + * OBSOLETE: WAS: override to prevent optional startup DNS tests. */ + debugs(1,DBG_CRITICAL, "WARNING: -D command-line option is obsolete."); break; case 'F': diff --git a/src/structs.h b/src/structs.h index 3ddfa8e535..ba763e7ed1 100644 --- a/src/structs.h +++ b/src/structs.h @@ -371,7 +371,6 @@ struct SquidConfig size_t udpMaxHitObjsz; wordlist *hierarchy_stoplist; wordlist *mcast_group_list; - wordlist *dns_testname_list; wordlist *dns_nameservers; peer *peers; int npeers;