From 88c00a6569d6080230a972b2de5e1c6c0c1c098b Mon Sep 17 00:00:00 2001 From: Ermal Date: Fri, 20 Aug 2010 12:18:12 +0000 Subject: 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. --- usr/local/www/interfaces.php | 4 ++++ 1 file changed, 4 insertions(+) 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"); -- cgit v1.1