summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2010-03-28 21:11:22 +0000
committerErmal <eri@pfsense.org>2010-03-28 21:11:22 +0000
commitda75413deffdd3c4bf529648d11ca659624d01da (patch)
tree9fcb3e7daabcb413812b1c229fe247b3f5c6a003 /usr
parent822263b772c37a8c5a4679ac844a384f37e77f08 (diff)
downloadpfsense-da75413deffdd3c4bf529648d11ca659624d01da.zip
pfsense-da75413deffdd3c4bf529648d11ca659624d01da.tar.gz
Fix interface assignment and re-edit
Diffstat (limited to 'usr')
-rwxr-xr-xusr/local/www/interfaces.php9
-rwxr-xr-xusr/local/www/interfaces_assign.php2
2 files changed, 4 insertions, 7 deletions
diff --git a/usr/local/www/interfaces.php b/usr/local/www/interfaces.php
index 58304d6..9cf592e 100755
--- a/usr/local/www/interfaces.php
+++ b/usr/local/www/interfaces.php
@@ -186,7 +186,7 @@ switch($wancfg['ipaddr']) {
$pconfig['type'] = "pptp";
break;
case "ppp":
- $pconfig['type'] = "none";
+ $pconfig['type'] = "ppp";
break;
default:
if(is_ipaddr($wancfg['ipaddr'])) {
@@ -200,10 +200,6 @@ switch($wancfg['ipaddr']) {
break;
}
-// Handle PPP type interfaces
-if($wancfg['serialport'])
- $pconfig['type'] = "none";
-
$pconfig['blockpriv'] = isset($wancfg['blockpriv']);
$pconfig['blockbogons'] = isset($wancfg['blockbogons']);
$pconfig['spoofmac'] = $wancfg['spoofmac'];
@@ -470,7 +466,8 @@ if ($_POST) {
}
}
if (!$input_errors) {
- unset($wancfg['ipaddr']);
+ if ($wancfg['ipaddr'] != "ppp")
+ unset($wancfg['ipaddr']);
unset($wancfg['subnet']);
unset($wancfg['gateway']);
unset($wancfg['dhcphostname']);
diff --git a/usr/local/www/interfaces_assign.php b/usr/local/www/interfaces_assign.php
index 605fdad..663be60 100755
--- a/usr/local/www/interfaces_assign.php
+++ b/usr/local/www/interfaces_assign.php
@@ -201,7 +201,7 @@ if ($_POST['apply']) {
$reloadif = true;
}
$config['interfaces'][$ifname]['if'] = $ifport;
- if (preg_match('/^ppp[0-9]+/',$ifport)){
+ if (file_exists("/dev/{$ifport}")) {
$config['interfaces'][$ifname]['if'] = basename($portlist[$ifport]['port']);
$config['interfaces'][$ifname]['ipaddr'] = "ppp";
}
OpenPOWER on IntegriCloud