mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Do not allow proxy arp to be edited if it references a carp.
This commit is contained in:
parent
e19b7d1ea8
commit
a3733a0c35
@ -154,8 +154,22 @@ if ($_POST) {
|
||||
}
|
||||
|
||||
if (isset($id) && ($a_vip[$id])) {
|
||||
if ($a_vip[$id]['mode'] != $_POST['mode'])
|
||||
interface_vip_bring_down($a_vip[$id]);
|
||||
if ($a_vip[$id]['mode'] != $_POST['mode']) {
|
||||
$bringdown = false;
|
||||
if ($a_vip[$id]['mode'] == "proxyarp") {
|
||||
$vipiface = $a_vip[$id]['interface'];
|
||||
foreach ($a_vip as $vip) {
|
||||
if ($vip['interface'] == $vipiface && $vip['mode'] == "carp") {
|
||||
if (ip_in_subnet($vip['subnet'], gen_subnet($a_vip[$id]['subnet'], $a_vip[$id]['subnet_bits']) . "/" . $a_vip[$id]['subnet_bits'])) {
|
||||
$input_errors[] = gettext("This entry cannot be modified because it is still referenced by CARP") . " {$vip['descr']}.";
|
||||
$bringdown = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (bringdown == false)
|
||||
interface_vip_bring_down($a_vip[$id]);
|
||||
}
|
||||
if ($a_vip[$id]['interface'] != $_POST['interface'])
|
||||
interface_vip_bring_down($a_vip[$id]);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user