From 4fa610928619a48ce2de1f0f18e4715f8590e333 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Sat, 18 Apr 2009 18:14:54 -0400 Subject: Correct checks for PPPoE and PPPTP --- config/squid/squid.inc | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) (limited to 'config') diff --git a/config/squid/squid.inc b/config/squid/squid.inc index ebbde873..2dd401f9 100644 --- a/config/squid/squid.inc +++ b/config/squid/squid.inc @@ -1244,17 +1244,13 @@ function squid_generate_rules($type) { $rules .= "rdr on $iface proto tcp from any to !($iface) port 80 -> 127.0.0.1 port 80\n"; } /* Handle PPPOE case */ - if($config['pppoe']['mode'] == "off") { + if($config['pppoe']['mode'] == "server") { $rules .= "rdr on \$pppoe proto tcp from any to !(\$pppoe) port 80 -> 127.0.0.1 port 80\n"; } /* Handle PPTP case */ -/* Disable PPTP Case until error is found -// if($config['pptpd']['mode'] != "off") { -// is not present in config.xml after disabling "redir" - if($config['pptpd']['mode'] == "server") { + if($config['pptpd']['mode'] == "server") { $rules .= "rdr on \$pptp proto tcp from any to !(\$pptp) port 80 -> 127.0.0.1 port 80\n"; } -*/ $rules .= "\n"; break; case 'filter': @@ -1264,16 +1260,12 @@ function squid_generate_rules($type) { $rules .= "pass in quick on $iface proto tcp from any to !($iface) port $port flags S/SA keep state\n"; $rules .= "\n"; }; - if($config['pppoe']['mode'] == "off") { + if($config['pppoe']['mode'] == "server") { $rules .= "pass in quick on \$pppoe proto tcp from any to !(\$pppoe) port $port flags S/SA keep state\n"; } -/* Disable PPTP Case until error is found -// if($config['pptpd']['mode'] != "off") { -// is not present in config.xml after disabling "redir" if($config['pptpd']['mode'] == "server") { $rules .= "pass in quick on \$pptp proto tcp from any to !(\$pptp) port $port flags S/SA keep state\n"; } -*/ break; default: break; @@ -1281,4 +1273,5 @@ function squid_generate_rules($type) { return $rules; } -?> + +?> \ No newline at end of file -- cgit v1.2.3