]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug #2739: DNS resolver option ndots can't be parsed from resolv.conf
authorHenrik Nordstrom <henrik@henriknordstrom.net>
Sat, 8 Aug 2009 22:08:34 +0000 (00:08 +0200)
committerHenrik Nordstrom <henrik@henriknordstrom.net>
Sat, 8 Aug 2009 22:08:34 +0000 (00:08 +0200)
Author: Cloyce <cloyce.spradling@sun.com>

A small logic error (probably a typo) in dns_internal.cc prevents squid from
properly reading the ndots option from resolv.conf.

The attached trivial patch fixes the problem.

src/dns_internal.cc

index c3ca3df8770337ddd91f4b46749a0c2f3c3caa8d..d4e9eb6a202d6c023b364b91761b3dd200b478db 100644 (file)
@@ -346,7 +346,7 @@ idnsParseResolvConf(void)
                 if (NULL == t)
                     continue;
 
-                if (strncmp(t, "ndots:", 6) != 0) {
+                if (strncmp(t, "ndots:", 6) == 0) {
                     ndots = atoi(t + 6);
 
                     if (ndots < 1)