From 7fc5b5d2e110ca0db984d73f26740ebc806fa5b6 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Sat, 24 Sep 2005 03:02:51 +0000 Subject: Correctly resolve LAN and WAN ip's --- packages/squid_ng.inc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'packages') diff --git a/packages/squid_ng.inc b/packages/squid_ng.inc index 33845789..c9675d07 100644 --- a/packages/squid_ng.inc +++ b/packages/squid_ng.inc @@ -117,7 +117,13 @@ function global_write_squid_config() { /* option: http_port */ if($http_port == "") $http_port="3128"; $int = convert_friendly_interface_to_real_interface_name($config['installedpackages']['squidng']['config'][0]['active_interface']); - $listen_ip = find_interface_ip($int); + if($int == "LAN") { + $listen_ip = find_interface_ip($config['interfaces']['lan']['if']); + } elseif($int == "WAN") { + $listen_ip = find_interface_ip($config['interfaces']['wan']['if']); + } else { + $listen_ip = find_interface_ip($int); + } fwrite($fout, "http_port " . $listen_ip . ":" . $http_port . "\n"); fwrite($fout, "\n"); -- cgit v1.2.3