summaryrefslogtreecommitdiffstats
path: root/usr/local/www/firewall_virtual_ip.php
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2010-12-17 21:31:31 +0000
committerErmal <eri@pfsense.org>2010-12-17 21:31:31 +0000
commit82db1bc578463bbbb7fcbd2c9e5be1f006e58d9a (patch)
tree055ec2433476f39c6cc1013335d49041442d75c8 /usr/local/www/firewall_virtual_ip.php
parentb3c1391af18af012c490e8aa0d275a36125b8374 (diff)
downloadpfsense-82db1bc578463bbbb7fcbd2c9e5be1f006e58d9a.zip
pfsense-82db1bc578463bbbb7fcbd2c9e5be1f006e58d9a.tar.gz
More safety belts. Do not allow a carp referenced by an ipalias to be deleted.
Diffstat (limited to 'usr/local/www/firewall_virtual_ip.php')
-rwxr-xr-xusr/local/www/firewall_virtual_ip.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/usr/local/www/firewall_virtual_ip.php b/usr/local/www/firewall_virtual_ip.php
index c3607ec..63d0f7e 100755
--- a/usr/local/www/firewall_virtual_ip.php
+++ b/usr/local/www/firewall_virtual_ip.php
@@ -117,6 +117,12 @@ if ($_GET['act'] == "del") {
if (ip_in_subnet($vip['subnet'], gen_subnet($a_vip[$_GET['id']]['subnet'], $a_vip[$_GET['id']]['subnet_bits']) . "/" . $a_vip[$_GET['id']]['subnet_bits']))
$input_errors[] = gettext("This entry cannot be deleted because it is still referenced by CARP") . " {$vip['descr']}.";
}
+ } else if ($a_vip[$_GET['id']]['mode'] == "carp") {
+ $vipiface = $a_vip[$_GET['id']]['interface'];
+ foreach ($a_vip as $vip) {
+ if ($vipiface == "vip{$vip['vhid']}" && $vip['mode'] == "ipalias")
+ $input_errors[] = gettext("This entry cannot be deleted because it is still referenced by ip alias entry") . " {$vip['descr']}.";
+ }
}
OpenPOWER on IntegriCloud