diff options
author | Ermal <eri@pfsense.org> | 2010-08-20 12:18:12 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2010-08-20 12:18:12 +0000 |
commit | 88c00a6569d6080230a972b2de5e1c6c0c1c098b (patch) | |
tree | 7daaa5c6eb6e5ad8cb855ed1b3c51dd8ff000bc6 | |
parent | 79851fc849952a278d28ff83a1096f990ee6b5c5 (diff) | |
download | pfsense-88c00a6569d6080230a972b2de5e1c6c0c1c098b.zip pfsense-88c00a6569d6080230a972b2de5e1c6c0c1c098b.tar.gz |
Ticket #829. Do not allow an interface to switch back to static/dhcp/none if it is configured as ppp/pppoe/pptp. for now just blacklist this option because it is not so trivial to fix.
-rwxr-xr-x | usr/local/www/interfaces.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/usr/local/www/interfaces.php b/usr/local/www/interfaces.php index cbb963a..a451954 100755 --- a/usr/local/www/interfaces.php +++ b/usr/local/www/interfaces.php @@ -374,6 +374,10 @@ if ($_POST) { $reqdfields = explode(" ", "ipaddr subnet gateway"); $reqdfieldsn = array(gettext("IP address"),gettext("Subnet bit count"),gettext("Gateway")); do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors); + case "none": + case "dhcp": + if (in_array($wancfg['ipaddr'], array("ppp", "pppoe", "pptp", "l2tp"))) + $input_errors[] = "You have to reassign the interface to be able to configure as {$_POST['type']}."; break; case "ppp": $reqdfields = explode(" ", "port phone"); |