From: Alex Rousskov Date: Fri, 30 Aug 2013 16:36:30 +0000 (-0600) Subject: Use ftp_port as "my port" if there are no http[s]_ports configured. X-Git-Tag: SQUID_3_5_0_1~117^2~37 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=547f303105a72bb2b50cca499471101e84b3e26b;p=thirdparty%2Fsquid.git Use ftp_port as "my port" if there are no http[s]_ports configured. --- diff --git a/src/tools.cc b/src/tools.cc index 59cafda1de..2ab47d3ecd 100644 --- a/src/tools.cc +++ b/src/tools.cc @@ -1222,6 +1222,14 @@ getMyPort(void) } #endif + if ((p = Config.Sockaddr.ftp)) { + // skip any special interception ports + while (p && p->flags.isIntercepted()) + p = p->next; + if (p) + return p->s.port(); + } + debugs(21, DBG_CRITICAL, "ERROR: No forward-proxy ports configured."); return 0; // Invalid port. This will result in invalid URLs on bad configurations. }