aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xconfig/squid3/34/squid.inc22
-rw-r--r--pkg_config.10.xml2
2 files changed, 15 insertions, 9 deletions
diff --git a/config/squid3/34/squid.inc b/config/squid3/34/squid.inc
index aee85bcd..b7eb9889 100755
--- a/config/squid3/34/squid.inc
+++ b/config/squid3/34/squid.inc
@@ -41,12 +41,6 @@ require_once('service-utils.inc');
if (!function_exists("filter_configure")) {
require_once("filter.inc");
}
-/* Squid reverse proxy */
-require_once('/usr/local/pkg/squid_reverse.inc');
-/* Squid javascript helpers */
-require_once('/usr/local/pkg/squid_js.inc');
-/* Squid antivirus intergration features helpers */
-require_once('/usr/local/pkg/squid_antivirus.inc');
$shortcut_section = "squid";
@@ -77,6 +71,13 @@ if ($uname['machine'] == 'amd64') {
ini_set('memory_limit', '250M');
}
+/* Squid reverse proxy */
+require_once('/usr/local/pkg/squid_reverse.inc');
+/* Squid javascript helpers */
+require_once('/usr/local/pkg/squid_js.inc');
+/* Squid antivirus intergration features helpers */
+require_once('/usr/local/pkg/squid_antivirus.inc');
+
/*
* Utility functions
*/
@@ -1222,9 +1223,14 @@ EOD;
foreach ($real_ifaces as $iface) {
list($ip, $mask) = $iface;
$ip = long2ip(ip2long($ip) & ip2long($mask));
- $mask = 32-log((ip2long($mask) ^ ip2long('255.255.255.255'))+1,2);
+ $mask = 32 - log((ip2long($mask) ^ ip2long('255.255.255.255')) +1, 2);
if (!preg_match("@$ip/$mask@", $src)) {
- $src .= " $ip/$mask";
+ // XXX: Do not add invalid subnets (Bug #4331, Bug #4526)
+ if (is_subnet("{$ip}/{$mask}")) {
+ $src .= " $ip/$mask";
+ } else {
+ log_error("[squid] 'Allow Users on Interface' ACL skipped for '{$ip}/{$mask}' since it is not a valid subnet.");
+ }
}
}
$conf .= "# Allow local network(s) on interface(s)\n";
diff --git a/pkg_config.10.xml b/pkg_config.10.xml
index 78b56b5b..f78abc45 100644
--- a/pkg_config.10.xml
+++ b/pkg_config.10.xml
@@ -1089,7 +1089,7 @@
<pkginfolink>https://forum.pfsense.org/index.php?topic=100167.0</pkginfolink>
<website>http://www.squid-cache.org/</website>
<category>Services</category>
- <version>0.4.3</version>
+ <version>0.4.4</version>
<status>BETA</status>
<required_version>2.2</required_version>
<maintainer>marcellocoutinho@gmail.com fernando@netfilter.com.br seth.mos@dds.nl mfuchs77@googlemail.com jimp@pfsense.org</maintainer>