diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2006-03-14 23:11:56 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2006-03-14 23:11:56 +0000 |
commit | 9d09c752a19c39661f179ef3018cbf8646d6571e (patch) | |
tree | 5b8dceebc77e71f257a472351f971ca55e48c012 /etc | |
parent | 865cd2fb5fb9a59ea29cb76dcd961f9efd716d66 (diff) | |
download | pfsense-9d09c752a19c39661f179ef3018cbf8646d6571e.zip pfsense-9d09c752a19c39661f179ef3018cbf8646d6571e.tar.gz |
Do not install netgraph interface aliases if a service is turned off
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/filter.inc | 40 |
1 files changed, 22 insertions, 18 deletions
diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc index 9fe8b07..bcc812e 100644 --- a/etc/inc/filter.inc +++ b/etc/inc/filter.inc @@ -237,24 +237,28 @@ function filter_generate_aliases() { $aliases .= "lan = \"{ {$config['interfaces']['lan']['if']}{$lan_aliases} }\"\n"; $aliases .= "wan = \"{ " . get_real_wan_interface() . "{$wan_aliases} }\"\n"; - /* build pptp alias */ - $tmp = "pptp = \"{ "; - for($x=0; $x<$g["n_pptp_units"]; $x++) - $tmp .= "ng{$x} "; - $counter = $x; - $tmp .= "}\" \n"; - if($counter > 0) - $aliases .= $tmp; - - /* build pppoe alias */ - $tmp = "pppoe = \"{ "; - for($x=0; $x<$g["n_pppoe_units"]; $x++) { - $tmp .= "ng{$counter} "; - $counter++; - } - $tmp .= "}\" \n"; - if($x > 0) - $aliases .= $tmp; + /* ng ordering is VERY important here. do not alter orer */ + if($config['pptpd']['mode'] == "server") { + /* build pptp alias */ + $tmp = "pptp = \"{ "; + for($x=0; $x<$g["n_pptp_units"]; $x++) + $tmp .= "ng{$x} "; + $counter = $x; + $tmp .= "}\" \n"; + if($counter > 0) + $aliases .= $tmp; + } + if($config['pppoe']['mode'] == "server") { + /* build pppoe alias */ + $tmp = "pppoe = \"{ "; + for($x=0; $x<$g["n_pppoe_units"]; $x++) { + $tmp .= "ng{$counter} "; + $counter++; + } + $tmp .= "}\" \n"; + if($x > 0) + $aliases .= $tmp; + } $ifdescrs = array(); for ($j = 1; isset($config['interfaces']['opt' . $j]); $j++) { |