diff options
author | Ermal Luçi <eri@pfsense.org> | 2008-04-16 18:29:42 +0000 |
---|---|---|
committer | Ermal Luçi <eri@pfsense.org> | 2008-04-16 18:29:42 +0000 |
commit | 6dd9b0154e4da222d12b814e4338b1181296df77 (patch) | |
tree | d34a26d986f99f74a09f4b184150fa6b1c12df62 | |
parent | 6a74c90e9d12a5ad6e8b16e8c22fa60b658f0a85 (diff) | |
download | pfsense-6dd9b0154e4da222d12b814e4338b1181296df77.zip pfsense-6dd9b0154e4da222d12b814e4338b1181296df77.tar.gz |
First try to cope with the new ability of mpd to rename its interfaces.
This is just a s/ng0/typeof connection0/ for now.
The major work should be done to allow all optX and lan to be pppoe or pptp interafaces and take just assign the network interface accordingly. It simplifies a lot o things but this has to be done.
This would propperly identifying interfaces and not hardcoding names around.
-rw-r--r-- | etc/inc/filter.inc | 9 | ||||
-rw-r--r-- | etc/inc/interfaces.inc | 13 | ||||
-rw-r--r-- | etc/inc/pfsense-utils.inc | 4 |
3 files changed, 15 insertions, 11 deletions
diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc index 07fb879..c52eba9 100644 --- a/etc/inc/filter.inc +++ b/etc/inc/filter.inc @@ -335,9 +335,12 @@ function filter_generate_aliases() { if($config['interfaces']['lan']) $aliases .= "lan = \"{ {$config['interfaces']['lan']['if']}{$lan_aliases} }\"\n"; - if($config['interfaces']['wan']['ipaddr'] == "pppoe" or $config['interfaces']['wan']['ipaddr'] == "pptp") { - $aliases .= "ng0 = \"{ " . $config['interfaces']['wan']['if'] . " " . get_real_wan_interface() . " }\" \n"; - $aliases .= "wan = \"{ " . $config['interfaces']['wan']['if'] . "{$wan_aliases} ng0 }\"\n"; + if($config['interfaces']['wan']['ipaddr'] == "pppoe") { + $aliases .= "pppoe0 = \"{ " . $config['interfaces']['wan']['if'] . " " .get_real_wan_interface() . " }\" \n"; + $aliases .= "wan = \"{ " . $config['interfaces']['wan']['if'] . "{$wan_aliases} pppoe0 }\"\n"; + } else if ($config['interfaces']['wan']['ipaddr'] == "pptp") { + $aliases .= "pptp0 = \"{ " . $config['interfaces']['wan']['if'] . " " . get_real_wan_interface() . " }\" \n"; + $aliases .= "wan = \"{ " . $config['interfaces']['wan']['if'] . "{$wan_aliases} pptp0 }\"\n"; } else { $aliases .= "wan = \"{ " . get_real_wan_interface() . "{$wan_aliases} }\"\n"; } diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc index 80a2052..c473d76 100644 --- a/etc/inc/interfaces.inc +++ b/etc/inc/interfaces.inc @@ -1311,7 +1311,7 @@ function interfaces_wan_pppoe_configure() { $mpdconf = <<<EOD startup: pppoeclient: - new -i ng0 pppoeclient pppoeclient + new -i pppoe0 pppoeclient pppoeclient set iface route default set iface {$ondemand} on-demand set iface idle {$idle} @@ -1470,7 +1470,7 @@ function interfaces_wan_pptp_configure() { $mpdconf = <<<EOD pptp: - new -i ng0 pptp pptp + new -i pptp0 pptp pptp set iface route default set iface {$ondemand} on-demand set iface idle {$idle} @@ -1633,9 +1633,10 @@ function get_real_wan_interface() { $wancfg = $config['interfaces']['wan']; $wanif = $wancfg['if']; - if (($wancfg['ipaddr'] == "pppoe") || ($wancfg['ipaddr'] == "pptp")) { - $wanif = $g['pppoe_interface']; - } + if ($wancfg['ipaddr'] == "pppoe") + $wanif = "pppoe0"; + if ($wancfg['ipaddr'] == "pptp") + $wanif = "pptp0"; return $wanif; } @@ -1836,4 +1837,4 @@ function get_interface_mac($interface) { return $mac; } -?>
\ No newline at end of file +?> diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc index e153153..8c0228d 100644 --- a/etc/inc/pfsense-utils.inc +++ b/etc/inc/pfsense-utils.inc @@ -1783,7 +1783,7 @@ function execute_command_return_output($command) { function convert_friendly_interface_to_real_interface_name($interface) { global $config; if($config['interfaces'][$interface]['ipaddr'] == "pppoe") - return "ng0"; + return "pppoe0"; if(isset($config['interfaces'][$interface]['pointtopoint'])) return "ppp0"; $lc_interface = strtolower($interface); @@ -4056,4 +4056,4 @@ function lookup_gateway_interface_by_name($name) { } } -?>
\ No newline at end of file +?> |