diff options
author | jim-p <jim@pingle.org> | 2009-04-19 18:46:57 -0400 |
---|---|---|
committer | jim-p <jim@pingle.org> | 2009-04-19 18:46:57 -0400 |
commit | 8e2350446a781758916dc7e17030b891f6dfd7c2 (patch) | |
tree | e51dea3ba8414b054e4439412711b2a7af231fd6 | |
parent | ae4516f73513f70957d5a7de68a4b64a549c1395 (diff) | |
download | pfsense-packages-8e2350446a781758916dc7e17030b891f6dfd7c2.tar.gz pfsense-packages-8e2350446a781758916dc7e17030b891f6dfd7c2.tar.bz2 pfsense-packages-8e2350446a781758916dc7e17030b891f6dfd7c2.zip |
Fix Squid Port check, so WebGUI and Squid ports can't overlap. Fixes Ticket #1907
The actual test was already there, but the $port variable wasn't properly set beforehand.
This should be a non-issue for people who just check "Transparent" and leave squid on the default port. People who get bit by this seem to also set squid's main port to 80 instead of the default.
-rw-r--r-- | config/squid/squid.inc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/config/squid/squid.inc b/config/squid/squid.inc index c0dc5a06..dbd8267f 100644 --- a/config/squid/squid.inc +++ b/config/squid/squid.inc @@ -285,6 +285,10 @@ function squid_before_form_general($pkg) { function squid_validate_general($post, $input_errors) { global $config; + $settings = $config['installedpackages']['squid']['config'][0]; + $port = ($settings['proxy_port'] ? $settings['proxy_port'] : 3128); + $port = $post['proxy_port'] ? $post['proxy_port'] : $port; + $icp_port = trim($post['icp_port']); if (!empty($icp_port) && !is_port($icp_port)) $input_errors[] = 'You must enter a valid port number in the \'ICP port\' field'; |