]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug 3011: extra tunnel and ICAP IPv4-only port fixes.
authorAmos Jeffries <squid3@treenet.co.nz>
Wed, 11 Aug 2010 10:58:42 +0000 (22:58 +1200)
committerAmos Jeffries <squid3@treenet.co.nz>
Wed, 11 Aug 2010 10:58:42 +0000 (22:58 +1200)
This is just the polish bits. The rest was added in pieces earlier. :(

src/adaptation/ServiceConfig.cc
src/tunnel.cc

index f69f66e3117eb5a2024d28475a5ce671c2ea54ef..9751422f056f38fa5d2bf9028dc0c9e2eff9df15 100644 (file)
@@ -5,6 +5,7 @@
 #include "squid.h"
 #include "ConfigParser.h"
 #include "adaptation/ServiceConfig.h"
+#include "ip/tools.h"
 
 Adaptation::ServiceConfig::ServiceConfig():
         port(-1), method(methodNone), point(pointNone),
@@ -93,8 +94,10 @@ Adaptation::ServiceConfig::parse()
             grokked = grokBool(bypass, name, value);
         else if (strcmp(name, "routing") == 0)
             grokked = grokBool(routing, name, value);
-        if (strcmp(name, "ipv6") == 0) {
+        else if (strcmp(name, "ipv6") == 0) {
             grokked = grokBool(ipv6, name, value);
+            if (grokked && ipv6 && !Ip::EnableIpv6)
+                debugs(3, DBG_IMPORTANT, "WARNING: IPv6 is disabled. ICAP service option ignored.");
         } else {
             debugs(3, 0, cfg_filename << ':' << config_lineno << ": " <<
                    "unknown adaptation service option: " << name << '=' << value);
index 8a45b35ad9aefe954cd7d3dff03b72edd3f9f15c..ec26c59559929a7cc63aa4766c2d61d90dcd74f1 100644 (file)
@@ -648,8 +648,7 @@ tunnelStart(ClientHttpRequest * http, int64_t * size_ptr, int *status_ptr)
         debugs(50, 4, "tunnelStart: IPv6 is Disabled. Tunnel failed from " << temp);
         ErrorState *anErr = errorCon(ERR_CONNECT_FAIL, HTTP_SERVICE_UNAVAILABLE, request);
         anErr->xerrno = EAFNOSUPPORT;
-        fail(anErr);
-        self = NULL;    // refcounted
+        errorSend(fd, anErr);
         return;
     }