]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug 2379: obsolete dns_testnames option
authorAmos Jeffries <squid3@treenet.co.nz>
Sat, 9 Aug 2008 06:24:33 +0000 (18:24 +1200)
committerAmos Jeffries <squid3@treenet.co.nz>
Sat, 9 Aug 2008 06:24:33 +0000 (18:24 +1200)
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.

doc/release-notes/release-3.1.sgml
src/cf.data.pre
src/globals.h
src/ipcache.cc
src/main.cc
src/structs.h

index ce56d6543091bc49ee9895053635a3c6504e48d2..58aeaa1bf69e4a11843dfebd71a5a4a4154a428c 100644 (file)
@@ -302,6 +302,9 @@ This section gives a thorough account of those changes in three categories:
 <p>\r
 <descrip>\r
 \r
+       <tag>dns_testnames</tag>\r
+       <p>Obsolete. This feature is no longer relevant to modern networks and causes boot problems.</p>\r
+\r
 </descrip>\r
 \r
 \r
index 086e1b71df3f556d969931d4e30cb6e289d7fd6f..ffe060660240cd95169730723c751d9ee1d6485a 100644 (file)
@@ -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
index 27c2e209774705b1b01bf97cd9564e66acc37b61..3af974ff1199fb9ccef41622fbb709c6be765766 100644 (file)
@@ -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 */
index ff8e07e06bcb5e6c4debc93153e7e2e287f9d765..4a653029a7d190e2d34e515bb9ebfbc83a2a3bcf 100644 (file)
@@ -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));
index f28d3dfecd49a40db5d6c73ea39750925a6efab7..e98c47942676f6a9ffd21250fee53cf6619cd996 100644 (file)
@@ -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':
index 3ddfa8e5358f6a21f4fca34bed8e3e70d43314cb..ba763e7ed125ecf843f11a4f6f574374a52080c7 100644 (file)
@@ -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;