From: Amos Jeffries Date: Fri, 30 Dec 2011 12:29:14 +0000 (+1300) Subject: Polish: allow service of internal requests over reverse-proxy ports X-Git-Tag: BumpSslServerFirst.take05~12^2~101 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c4ac4197e9ecad20b58a1c7c288a0cef6c46fbf1;p=thirdparty%2Fsquid.git Polish: allow service of internal requests over reverse-proxy ports There is no reason why a revers-proxy port cannot service Squid internal requests as well as whatever domain is being accelerated. Also, scan the https_port list same as http_port list now that the structures have been normalized. --- diff --git a/src/tools.cc b/src/tools.cc index 10231afd6d..bc0d83162e 100644 --- a/src/tools.cc +++ b/src/tools.cc @@ -1258,18 +1258,23 @@ parseEtcHosts(void) int getMyPort(void) { - if (Config.Sockaddr.http) { - // skip any special mode ports - http_port_list *p = Config.Sockaddr.http; - while (p && (p->intercepted || p->accel || p->spoof_client_ip)) + http_port_list *p = NULL; + if ((p = Config.Sockaddr.http)) { + // skip any special interception ports + while (p && (p->intercepted || p->spoof_client_ip)) p = p->next; if (p) return p->s.GetPort(); } #if USE_SSL - if (Config.Sockaddr.https) - return Config.Sockaddr.https->s.GetPort(); + if ((p = Config.Sockaddr.https)) { + // skip any special interception ports + while (p && (p->intercepted || p->spoof_client_ip)) + p = p->next; + if (p) + return p->s.GetPort(); + } #endif debugs(21, DBG_CRITICAL, "ERROR: No forward-proxy ports configured.");