summaryrefslogtreecommitdiffstats
path: root/usr/local/www/interfaces.php
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2010-08-31 12:47:58 +0000
committerErmal <eri@pfsense.org>2010-08-31 12:47:58 +0000
commit62a4abc92cd31983d4b1c09eb95d28e001d9869d (patch)
treede1338f9577d72401529455f45ee55a78f283e29 /usr/local/www/interfaces.php
parent9dea60d1463b70e045bfd17b2e2068b4f0dee5db (diff)
downloadpfsense-62a4abc92cd31983d4b1c09eb95d28e001d9869d.zip
pfsense-62a4abc92cd31983d4b1c09eb95d28e001d9869d.tar.gz
Ticket #543. Do not allow to change an interface already configured to a type none if it is referenced by VIPs and also do not allow VIPs to be configured on an interface with type none. Maybe the latest should be relaxed to only disallow this for ipaliases?!
Diffstat (limited to 'usr/local/www/interfaces.php')
-rwxr-xr-xusr/local/www/interfaces.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/usr/local/www/interfaces.php b/usr/local/www/interfaces.php
index a451954..ac75dda 100755
--- a/usr/local/www/interfaces.php
+++ b/usr/local/www/interfaces.php
@@ -375,9 +375,15 @@ if ($_POST) {
$reqdfieldsn = array(gettext("IP address"),gettext("Subnet bit count"),gettext("Gateway"));
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
case "none":
+ if(is_array($config['virtualip']['vip'])) {
+ foreach ($config['virtualip']['vip'] as $vip) {
+ if ($vip['interface'] == $if)
+ $input_errors[] = gettext("This interface is referenced by VIPs please delete those before setting the interface to 'none' configuration.");
+ }
+ }
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']}.";
+ $input_errors[] = gettext("You have to reassign the interface to be able to configure as {$_POST['type']}.");
break;
case "ppp":
$reqdfields = explode(" ", "port phone");
OpenPOWER on IntegriCloud