mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Take care of cleaning the ip alias when we delete an entry of ipalias type or modify it.
This commit is contained in:
parent
2064fb9dc3
commit
53af883529
@ -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);
|
||||
|
||||
@ -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'])
|
||||
|
||||
Loading…
Reference in New Issue
Block a user