summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2010-08-20 12:18:12 +0000
committerErmal <eri@pfsense.org>2010-08-20 12:18:12 +0000
commit88c00a6569d6080230a972b2de5e1c6c0c1c098b (patch)
tree7daaa5c6eb6e5ad8cb855ed1b3c51dd8ff000bc6
parent79851fc849952a278d28ff83a1096f990ee6b5c5 (diff)
downloadpfsense-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-xusr/local/www/interfaces.php4
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");
OpenPOWER on IntegriCloud