From 434a4b6c351fc238700945c7a7f9402abdf69dfc Mon Sep 17 00:00:00 2001 From: jim-p Date: Thu, 7 Oct 2010 08:47:55 -0400 Subject: Ensure that http_access for allowed_subnets is added, regardless of whether 'allow_interface' is on or not. Submitted-By: wagonza. --- config/squid/squid.inc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/config/squid/squid.inc b/config/squid/squid.inc index 8a44d02c..fded1f8b 100644 --- a/config/squid/squid.inc +++ b/config/squid/squid.inc @@ -992,13 +992,15 @@ function squid_resync_auth() { $auth_method = (($settings['auth_method'] && !$transparent_proxy) ? $settings['auth_method'] : 'none'); // Allow the remaining ACLs if no authentication is set if ($auth_method == 'none') { + $conf .="# Setup allowed acls\n"; + $allowed = array('allowed_subnets'); if ($settingsconfig['allow_interface'] == 'on') { $conf .= "# Allow local network(s) on interface(s)\n"; - $allowed = array('localnet', 'allowed_subnets'); - $allowed = array_filter($allowed, 'squid_is_valid_acl'); - foreach ($allowed as $acl) - $conf .= "http_access allow $acl\n"; + $allowed[] = "localnet"; } + $allowed = array_filter($allowed, 'squid_is_valid_acl'); + foreach ($allowed as $acl) + $conf .= "http_access allow $acl\n"; } else { $noauth = implode(' ', explode("\n", base64_decode($settings['no_auth_hosts']))); -- cgit v1.2.3