]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Enable compile-time override for MAXTCPLISTENPORTS
authorAmos Jeffries <squid3@treenet.co.nz>
Sun, 3 Aug 2014 11:08:15 +0000 (05:08 -0600)
committerAmos Jeffries <squid3@treenet.co.nz>
Sun, 3 Aug 2014 11:08:15 +0000 (05:08 -0600)
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 9553caeeb2ebb0b84a0d7908b8b877145d1cdf2e..b6f0cd6a64bbe0feb9ce8cd98d1937e208a5e628 100644 (file)
@@ -92,8 +92,10 @@ public:
 
 } // namespace AnyP
 
+#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;