summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xusr/local/www/firewall_virtual_ip_edit.php5
-rwxr-xr-xusr/local/www/interfaces.php8
2 files changed, 11 insertions, 2 deletions
diff --git a/usr/local/www/firewall_virtual_ip_edit.php b/usr/local/www/firewall_virtual_ip_edit.php
index 8951435..214d127 100755
--- a/usr/local/www/firewall_virtual_ip_edit.php
+++ b/usr/local/www/firewall_virtual_ip_edit.php
@@ -109,9 +109,12 @@ if ($_POST) {
$input_errors[] = gettext("A valid IP address must be specified.");
$natiflist = get_configured_interface_with_descr();
- foreach ($natiflist as $natif => $natdescr)
+ foreach ($natiflist as $natif => $natdescr) {
+ if (empty($config['interfaces'][$natif]['ipaddr']))
+ $input_errors[] = gettext("The interface choosen for the VIP has no ip configured so it cannot be used as a parent for the VIP.");
if ($_POST['subnet'] == get_interface_ip($natif))
$input_errors[] = sprintf(gettext("The %s IP address may not be used in a virtual entry."),$natdescr);
+ }
if($_POST['subnet_bits'] == "32" and $_POST['type'] == "carp")
$input_errors[] = gettext("The /32 subnet mask is invalid for CARP IPs.");
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