diff --git a/usr/local/www/carp_status.php b/usr/local/www/carp_status.php index 517697c7c4..25b31aa3fc 100644 --- a/usr/local/www/carp_status.php +++ b/usr/local/www/carp_status.php @@ -112,7 +112,13 @@ if($_POST['disablecarp'] <> "") { } } -$carp_detected_problems = ((get_single_sysctl("net.inet.carp.demotion")) > 0); +$carp_detected_problems = get_single_sysctl("net.inet.carp.demotion"); + +if (!empty($_POST['resetdemotion'])) { + set_single_sysctl("net.inet.carp.demotion", "-{$carp_detected_problems}"); + sleep(1); + $carp_detected_problems = get_single_sysctl("net.inet.carp.demotion"); +} $pgtitle = array(gettext("Status"),gettext("CARP")); $shortcut_section = "carp"; @@ -125,8 +131,21 @@ include("head.inc");
-" . gettext("Check link status on all interfaces with configured CARP VIPs.")); ?> + 0) { + print_info_box( + gettext("CARP has detected a problem and this unit has been demoted to BACKUP status.") . "
" . + gettext("Check the link status on all interfaces with configured CARP VIPs.") . "
" . + gettext("Search the") . + " " . + gettext("system log") . + " " . + gettext("for CARP demotion-related events.") . "
" . + "" + ); +} ?>
@@ -199,6 +218,7 @@ include("head.inc"); $icon = "\"init\""; } else $icon = ""; + } } echo ""; echo "";
" . convert_friendly_interface_to_friendly_descr($carp['interface']) . "@{$vhid}  " . $ipaddress . "