diff options
author | Luiz Otavio O Souza <luiz@netgate.com> | 2015-11-27 09:04:39 -0600 |
---|---|---|
committer | Luiz Otavio O Souza <luiz@netgate.com> | 2015-11-27 09:04:39 -0600 |
commit | f92ea2e21d845e1fb6aad3bd9076b5ee931e0f36 (patch) | |
tree | dc3c8c16aa5bbeb05bba85f0e6d8e47602e40407 | |
parent | e686a73f17e94edbdca91b77b03f5ec266ac19ac (diff) | |
download | pfsense-f92ea2e21d845e1fb6aad3bd9076b5ee931e0f36.zip pfsense-f92ea2e21d845e1fb6aad3bd9076b5ee931e0f36.tar.gz |
Fix CARP status.
Remove unnecessary code and adjust the code to work with uniqid notation.
Ticket #4858
-rw-r--r-- | src/usr/local/www/carp_status.php | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/usr/local/www/carp_status.php b/src/usr/local/www/carp_status.php index 7e7ccd9..5d9fdbf 100644 --- a/src/usr/local/www/carp_status.php +++ b/src/usr/local/www/carp_status.php @@ -88,13 +88,10 @@ if ($_POST['disablecarp'] != "") { set_single_sysctl('net.inet.carp.allow', '0'); if (is_array($config['virtualip']['vip'])) { $viparr = &$config['virtualip']['vip']; - $found_dhcpdv6 = false; foreach ($viparr as $vip) { - $carp_iface = "{$vip['interface']}_vip{$vip['vhid']}"; switch ($vip['mode']) { case "carp": interface_vip_bring_down($vip); - interface_ipalias_cleanup($carp_iface); /* * Reconfigure radvd when necessary @@ -102,7 +99,8 @@ if ($_POST['disablecarp'] != "") { */ if (isset($config['dhcpdv6']) && is_array($config['dhcpdv6'])) { foreach ($config['dhcpdv6'] as $dhcpv6if => $dhcpv6ifconf) { - if ($dhcpv6ifconf['rainterface'] != $carp_iface) { + if ($dhcpv6if !== $vip['interface'] || + $dhcpv6ifconf['ramode'] === "disabled") { continue; } @@ -231,7 +229,7 @@ if ($carpcount == 0) { $ipaddress = $carp['subnet']; $vhid = $carp['vhid']; - $status = get_carp_interface_status("{$carp['interface']}_vip{$carp['vhid']}"); + $status = get_carp_interface_status("_vip{$carp['uniqid']}"); if($carp_enabled == false) { $icon = 'times-circle'; |