diff options
author | Chris Buechler <cmb@pfsense.org> | 2008-02-18 01:33:06 +0000 |
---|---|---|
committer | Chris Buechler <cmb@pfsense.org> | 2008-02-18 01:33:06 +0000 |
commit | 860c4e80bb62a525579d11b40711b4e2389fa12b (patch) | |
tree | 990adfb1aaa20fdf617db32798ef87fe46b3a21e /usr/local/www/interfaces_assign.php | |
parent | cc3087bd0541a5d1cc99843edde03d18ed460747 (diff) | |
download | pfsense-860c4e80bb62a525579d11b40711b4e2389fa12b.zip pfsense-860c4e80bb62a525579d11b40711b4e2389fa12b.tar.gz |
Initial import of PPP for 3G and dial up modem support.
Needs testing and likely some fixing, then porting to HEAD once verified working.
Diffstat (limited to 'usr/local/www/interfaces_assign.php')
-rwxr-xr-x | usr/local/www/interfaces_assign.php | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/usr/local/www/interfaces_assign.php b/usr/local/www/interfaces_assign.php index 908f984..d58fc36 100755 --- a/usr/local/www/interfaces_assign.php +++ b/usr/local/www/interfaces_assign.php @@ -50,6 +50,17 @@ if (is_array($config['vlans']['vlan']) && count($config['vlans']['vlan'])) { } } +/* add PPP interfaces */ +if (is_array($config['ppps']['ppp']) && count($config['ppps']['ppp'])) { + $i = 0; + foreach ($config['ppps']['ppp'] as $ppp) { + $portname = 'ppp_' . basename($ppp['port']); + $portlist[$portname] = $ppp; + $portlist[$portname]['isppp'] = true; + $i++; + } +} + if ($_POST) { unset($input_errors); @@ -92,7 +103,11 @@ if ($_POST) { if (!is_array($ifport)) { $config['interfaces'][$ifname]['if'] = $ifport; - + if (preg_match('/^ppp_(.+)$/', $ifport, $matches)) { + $config['interfaces'][$ifname]['pointtopoint'] = true; + $config['interfaces'][$ifname]['serialport'] = $matches[1]; + } + /* check for wireless interfaces, set or clear ['wireless'] */ if (preg_match($g['wireless_regex'], $ifport)) { if (!is_array($config['interfaces'][$ifname]['wireless'])) @@ -235,6 +250,7 @@ if(file_exists("/var/run/interface_mismatch_reboot_needed")) $tab_array = array(); $tab_array[0] = array("Interface assignments", true, "interfaces_assign.php"); $tab_array[1] = array("VLANs", false, "interfaces_vlan.php"); + $tab_array[2] = array("PPP", false, "interfaces_ppp.php"); display_top_tabs($tab_array); ?> </td></tr> @@ -264,6 +280,11 @@ if(file_exists("/var/run/interface_mismatch_reboot_needed")) if ($portinfo['descr']) $descr .= " (" . $portinfo['descr'] . ")"; echo htmlspecialchars($descr); + } elseif ($portinfo['isppp']) { + $descr = "PPP {$portinfo['port']}"; + if ($portinfo['descr']) + $descr .= " (" . $portinfo['descr'] . ")"; + echo htmlspecialchars($descr); } else echo htmlspecialchars($portname . " (" . $portinfo['mac'] . ")"); ?> |