mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Fix interface assignment and re-edit
This commit is contained in:
parent
822263b772
commit
da75413def
@ -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']);
|
||||
|
||||
@ -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";
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user