summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2010-11-23 12:57:32 +0000
committerErmal <eri@pfsense.org>2010-11-23 12:57:32 +0000
commit4ed5ad5a91eef69b46b248755d5dea2b9a00075c (patch)
tree635c863850c5e90ca4a0e648857b568bc3bbd1dc /usr
parent108cfddf3e133aecbe113fdf8eecfdc7fd2aab07 (diff)
downloadpfsense-4ed5ad5a91eef69b46b248755d5dea2b9a00075c.zip
pfsense-4ed5ad5a91eef69b46b248755d5dea2b9a00075c.tar.gz
Ticket #1023. Correct carp status even on the status page.
Diffstat (limited to 'usr')
-rwxr-xr-xusr/local/www/carp_status.php11
1 files changed, 6 insertions, 5 deletions
diff --git a/usr/local/www/carp_status.php b/usr/local/www/carp_status.php
index 543d3d7..b70a442 100755
--- a/usr/local/www/carp_status.php
+++ b/usr/local/www/carp_status.php
@@ -47,13 +47,11 @@ function gentitle_pkg($pgname) {
unset($interface_arr_cache);
unset($carp_interface_count_cache);
-unset($carp_query);
unset($interface_ip_arr_cache);
$status = get_carp_status();
if($_POST['disablecarp'] <> "") {
if($status == true) {
- $carp_ints = get_all_carp_interfaces();
mwexec("/sbin/sysctl net.inet.carp.allow=0");
if(is_array($config['virtualip']['vip'])) {
$viparr = &$config['virtualip']['vip'];
@@ -112,8 +110,10 @@ include("head.inc");
<?php
if(is_array($config['virtualip']['vip'])) {
foreach($config['virtualip']['vip'] as $carp) {
- if ($carp['mode'] == "carp")
+ if ($carp['mode'] == "carp") {
$carpcount++;
+ break;
+ }
}
}
if($carpcount > 0) {
@@ -146,13 +146,14 @@ include("head.inc");
if(is_array($config['virtualip']['vip'])) {
foreach($config['virtualip']['vip'] as $carp) {
- if ($carp['mode'] != "carp") continue;
+ if ($carp['mode'] != "carp")
+ continue;
$ipaddress = $carp['subnet'];
$password = $carp['password'];
$netmask = $carp['subnet_bits'];
$vhid = $carp['vhid'];
$advskew = $carp['advskew'];
- $carp_int = find_carp_interface($ipaddress);
+ $carp_int = "vip{$vhid}";
$status = get_carp_interface_status($carp_int);
echo "<tr>";
$align = "valign='middle'";
OpenPOWER on IntegriCloud