diff options
author | Seth Mos <seth.mos@dds.nl> | 2010-12-20 21:06:33 +0100 |
---|---|---|
committer | Seth Mos <seth.mos@dds.nl> | 2010-12-20 21:06:33 +0100 |
commit | 81afb50916235853a9b3046796199a443d27c224 (patch) | |
tree | f25e1acd56748f178699a1edc33c123bd2182f20 /usr/local/www/interfaces.php | |
parent | 172007f50c215acf458340773a32052c28556aaa (diff) | |
parent | 49659e1cc6f78af1287590fca7b64791fd6da6f1 (diff) | |
download | pfsense-81afb50916235853a9b3046796199a443d27c224.zip pfsense-81afb50916235853a9b3046796199a443d27c224.tar.gz |
Merge remote branch 'upstream/master'
Conflicts:
etc/inc/interfaces.inc
etc/inc/vslb.inc
usr/local/www/interfaces.php
Diffstat (limited to 'usr/local/www/interfaces.php')
-rwxr-xr-x | usr/local/www/interfaces.php | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/usr/local/www/interfaces.php b/usr/local/www/interfaces.php index 2a03124..b09690a 100755 --- a/usr/local/www/interfaces.php +++ b/usr/local/www/interfaces.php @@ -159,7 +159,7 @@ if ($wancfg['if'] == $a_ppps[$pppid]['if']) { } }// End force pppoe reset at specific time }// End if type == pppoe - if ($a_ppps[$pppid]['type'] == "pptp"){ + else if ($a_ppps[$pppid]['type'] == "pptp"){ $pconfig['pptp_username'] = $a_ppps[$pppid]['username']; $pconfig['pptp_password'] = base64_decode($a_ppps[$pppid]['password']); $pconfig['pptp_local'] = explode(",",$a_ppps[$pppid]['localip']); @@ -398,7 +398,7 @@ if ($_POST['apply']) { if (isset($config['dhcpd']) && isset($config['dhcpd'][$if]['enable']) && (! preg_match("/^static/", $_POST['type']))) $input_errors[] = gettext("The DHCP Server is active on this interface and it can be used only with a static IP configuration. Please disable the DHCP Server service on this interface first, then change the interface configuration."); - switch($_POST['type']) { + switch(strtolower($_POST['type'])) { case "staticv4": $reqdfields = explode(" ", "ipaddr subnet gateway"); $reqdfieldsn = array(gettext("IPv4 address"),gettext("Subnet bit count"),gettext("Gateway")); @@ -422,8 +422,6 @@ if ($_POST['apply']) { } } case "dhcp": - if (in_array($wancfg['ipaddr'], array("ppp", "pppoe", "pptp", "l2tp"))) - $input_errors[] = gettext("You have to reassign the interface to be able to configure as {$_POST['type']}."); break; case "dhcpv6": if (in_array($wancfg['ipaddrv6'], array("ppp", "pppoe", "pptp", "l2tp"))) @@ -434,7 +432,7 @@ if ($_POST['apply']) { $reqdfieldsn = array(gettext("Modem Port"),gettext("Phone Number")); do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors); break; - case "PPPoE": + case "pppoe": if ($_POST['pppoe_dialondemand']) { $reqdfields = explode(" ", "pppoe_username pppoe_password pppoe_dialondemand pppoe_idletimeout"); $reqdfieldsn = array(gettext("PPPoE username"),gettext("PPPoE password"),gettext("Dial on demand"),gettext("Idle timeout value")); @@ -444,7 +442,7 @@ if ($_POST['apply']) { } do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors); break; - case "PPTP": + case "pptp": if ($_POST['pptp_dialondemand']) { $reqdfields = explode(" ", "pptp_username pptp_password pptp_local pptp_subnet pptp_remote pptp_dialondemand pptp_idletimeout"); $reqdfieldsn = array(gettext("PPTP username"),gettext("PPTP password"),gettext("PPTP local IP address"),gettext("PPTP subnet"),gettext("PPTP remote IP address"),gettext("Dial on demand"),gettext("Idle timeout value")); @@ -561,6 +559,12 @@ if ($_POST['apply']) { } } if (!$input_errors) { + if ($wancfg['type'] != $_POST['type']) { + if (in_array($wancfg['ipaddr'], array("ppp", "pppoe", "pptp", "l2tp"))) { + $wancfg['if'] = $a_ppps[$pppid]['ports']; + unset($a_ppps[$pppid]); + } + } $ppp = array(); if ($wancfg['ipaddr'] != "ppp") unset($wancfg['ipaddr']); @@ -951,7 +955,7 @@ function check_wireless_mode() { } } -$pgtitle = array(gettext("Interfaces"), strtoupper($pconfig['descr'])); +$pgtitle = array(gettext("Interfaces"), $pconfig['descr']); $statusurl = "status_interfaces.php"; $closehead = false; |