diff options
author | Ermal <eri@pfsense.org> | 2010-12-17 21:31:31 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2010-12-17 21:31:31 +0000 |
commit | 82db1bc578463bbbb7fcbd2c9e5be1f006e58d9a (patch) | |
tree | 055ec2433476f39c6cc1013335d49041442d75c8 /usr/local/www/firewall_virtual_ip.php | |
parent | b3c1391af18af012c490e8aa0d275a36125b8374 (diff) | |
download | pfsense-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-x | usr/local/www/firewall_virtual_ip.php | 6 |
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']}."; + } } |