]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Use ftp_port as "my port" if there are no http[s]_ports configured.
authorAlex Rousskov <rousskov@measurement-factory.com>
Fri, 30 Aug 2013 16:36:30 +0000 (10:36 -0600)
committerAlex Rousskov <rousskov@measurement-factory.com>
Fri, 30 Aug 2013 16:36:30 +0000 (10:36 -0600)
src/tools.cc

index 59cafda1deba0cf3b4e7e828c0eea4c443b16952..2ab47d3ecd49411d1ba210b450018d1bd1685023 100644 (file)
@@ -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.
 }