]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Enable compile-time override for MAXTCPLISTENPORTS
authorAmos Jeffries <squid3@treenet.co.nz>
Tue, 29 Jul 2014 10:28:17 +0000 (22:28 +1200)
committerAmos Jeffries <squid3@treenet.co.nz>
Tue, 29 Jul 2014 10:28:17 +0000 (22:28 +1200)
MAXTCPLISTENPORTS controls the permitted number of http(s)_port which
may be configured. The hard-coded default is 128 ports.

This patch enables the use of CXXFLAGS="-DMAXTCPLISTENPORTS=n" to set a
new limit when building Squid.

src/anyp/PortCfg.h

index 50366523eddcdf4d1bfa10e19efaacaeda821df4..a27f08f2653f5177f88640de64a27f54f1e4454b 100644 (file)
@@ -106,8 +106,10 @@ extern AnyP::PortCfgPointer HttpPortList;
 extern AnyP::PortCfgPointer HttpsPortList;
 #endif
 
+#if !defined(MAXTCPLISTENPORTS)
 // Max number of TCP listening ports
 #define MAXTCPLISTENPORTS 128
+#endif
 
 // TODO: kill this global array. Need to check performance of array vs list though.
 extern int NHttpSockets;