diff options
author | Ermal Luçi <eri@pfsense.org> | 2009-03-26 17:15:41 +0000 |
---|---|---|
committer | Ermal Luçi <eri@pfsense.org> | 2009-03-26 17:15:41 +0000 |
commit | 53af8835299dd4c55ddf035e43fc8930cff31469 (patch) | |
tree | c650782b0d6811733c31ed1334c3fd42938a945a | |
parent | 2064fb9dc3e62ff3f6c545ed5cb25a193607f76c (diff) | |
download | pfsense-53af8835299dd4c55ddf035e43fc8930cff31469.zip pfsense-53af8835299dd4c55ddf035e43fc8930cff31469.tar.gz |
Take care of cleaning the ip alias when we delete an entry of ipalias type or modify it.
-rwxr-xr-x | usr/local/www/firewall_virtual_ip.php | 2 | ||||
-rwxr-xr-x | usr/local/www/firewall_virtual_ip_edit.php | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/usr/local/www/firewall_virtual_ip.php b/usr/local/www/firewall_virtual_ip.php index c1f212c..d0e05eb 100755 --- a/usr/local/www/firewall_virtual_ip.php +++ b/usr/local/www/firewall_virtual_ip.php @@ -90,6 +90,8 @@ if ($_GET['act'] == "del") { } if (!$input_errors) { + if ($a_vip[$_GET['id']]['type'] == "ipalias") + mwexec("/sbin/ifconfig " . get_real_interface($a_vip[$_GET['id']]['interface']) . " delete {$a_vip[$_GET['id']]['subnet']}"); unset($a_vip[$_GET['id']]); write_config(); touch($d_vipconfdirty_path); diff --git a/usr/local/www/firewall_virtual_ip_edit.php b/usr/local/www/firewall_virtual_ip_edit.php index 37e59f7..52029b5 100755 --- a/usr/local/www/firewall_virtual_ip_edit.php +++ b/usr/local/www/firewall_virtual_ip_edit.php @@ -195,6 +195,8 @@ if ($_POST) { } if (isset($id) && $a_vip[$id]) { + if ($_POST['mode'] == "ipalias") + mwexec("/sbin/ifconfig " . get_real_interface($a_vip[$id]['interface']) . " delete {$a_vip[$id]['subnet']}"); /* modify all virtual IP rules with this address */ for ($i = 0; isset($config['nat']['rule'][$i]); $i++) { if ($config['nat']['rule'][$i]['external-address'] == $a_vip[$id]['subnet']) |