From 3496b53afded6dd4c05808ccaab6c67587fdf7a3 Mon Sep 17 00:00:00 2001 From: Amos Jeffries Date: Wed, 11 Aug 2010 22:58:42 +1200 Subject: [PATCH] Bug 3011: extra tunnel and ICAP IPv4-only port fixes. This is just the polish bits. The rest was added in pieces earlier. :( --- src/adaptation/ServiceConfig.cc | 5 ++++- src/tunnel.cc | 3 +-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/adaptation/ServiceConfig.cc b/src/adaptation/ServiceConfig.cc index f69f66e311..9751422f05 100644 --- a/src/adaptation/ServiceConfig.cc +++ b/src/adaptation/ServiceConfig.cc @@ -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); diff --git a/src/tunnel.cc b/src/tunnel.cc index 8a45b35ad9..ec26c59559 100644 --- a/src/tunnel.cc +++ b/src/tunnel.cc @@ -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; } -- 2.47.2