diff options
author | gnhb <gnoahb@gmail.com> | 2010-04-30 16:05:47 +0700 |
---|---|---|
committer | gnhb <gnoahb@gmail.com> | 2010-04-30 16:05:47 +0700 |
commit | badbe34963e0a29a08b126b5503c1b793eb95706 (patch) | |
tree | 77dfb19726e7b6ffe2bb20e10d18d9c23589540f /etc/inc/interfaces.inc | |
parent | e2b236320550b1dc89c2649b6d733f79a4cd7012 (diff) | |
download | pfsense-badbe34963e0a29a08b126b5503c1b793eb95706.zip pfsense-badbe34963e0a29a08b126b5503c1b793eb95706.tar.gz |
Fix up code to make ppp work again with new interface naming structure.
New interface naming for all PPP (point to point) links is that interfaces
in the ppps config section will be numbered from 0 to n and the number
will be appended to the link type (ppp, pppoe, pptp) to create the interface
name.
Diffstat (limited to 'etc/inc/interfaces.inc')
-rw-r--r-- | etc/inc/interfaces.inc | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc index b5e778b..9044d48 100644 --- a/etc/inc/interfaces.inc +++ b/etc/inc/interfaces.inc @@ -881,22 +881,25 @@ function interface_bring_down($interface = "wan", $destroy = false) { function interface_ppp_configure($interface) { global $config, $g; - $wancfg =& $config['interfaces'][$interface]; + $wancfg = &$config['interfaces'][$interface]; if (is_array($config['ppps']['ppp']) && count($config['ppps']['ppp'])) { - foreach ($config['ppps']['ppp'] as $ppp) { - if ($wancfg['if'] == basename($ppp['port'])) + foreach ($config['ppps']['ppp'] as $pppid => $ppp) { + //$ppp['port'] = $ppp['ports']; + if ($interface == $ppp['ifname']) break; } } - if (!$ppp || empty($ppp['port'])) + if (!$ppp || !isset($ppp['ifname'])) return; - +/* if ($interface == "wan") $pppid = "0"; else $pppid = substr($interface, 3); $pppif = "ppp{$pppid}"; +*/ + $pppif = $wancfg['if']; // mpd5 requires a /var/spool/lock directory if(!is_dir("/var/spool/lock")) { |