0) { $carp_counter = 0; set_single_sysctl('net.inet.carp.allow', '0'); foreach ($a_vip as $vip) { switch ($vip['mode']) { case "carp": interface_vip_bring_down($vip); $carp_counter++; sleep(1); break; } } $savemsg = sprintf(gettext("%s IPs have been disabled. Please note that disabling does not survive a reboot."), $carp_counter); } else { $savemsg = gettext("CARP has been enabled."); foreach ($a_vip as $vip) { switch ($vip['mode']) { case "carp": interface_carp_configure($vip); sleep(1); break; } } interfaces_carp_setup(); set_single_sysctl('net.inet.carp.allow', '1'); } } } $carpcount = 0; foreach ($a_vip as $carp) { if ($carp['mode'] == "carp") { $carpcount++; break; } } // fetch pfsync info $pfsyncnodes = json_decode(configd_run("filter list pfsync json"), true); legacy_html_escape_form_data($a_vip); $status = (get_single_sysctl('net.inet.carp.allow') > 0); $carp_detected_problems = (array_pop(get_sysctl("net.inet.carp.demotion")) > 0); include("head.inc"); ?>
" . gettext("Check link status on all interfaces with configured CARP VIPs.")); } ?>
" /> " />
0 && $status)) { $icon = "glyphicon glyphicon-remove text-danger"; $intf_status = "DISABLED"; } elseif ($intf_status == "MASTER") { $icon = "glyphicon glyphicon-play text-success"; } elseif ($intf_status == "BACKUP") { $icon = "glyphicon glyphicon-play text-muted"; } elseif ($intf_status == "INIT") { $icon = "glyphicon glyphicon-info-sign"; }?>