summaryrefslogtreecommitdiffstats
path: root/usr/local/www/carp_status.php
diff options
context:
space:
mode:
authorBill Marquette <billm@pfsense.org>2005-07-13 03:09:18 +0000
committerBill Marquette <billm@pfsense.org>2005-07-13 03:09:18 +0000
commit1425e067d6db9b41eafe67070742e3b466178053 (patch)
treec6996ad986ab75ecba8c3f1eb815134202bba875 /usr/local/www/carp_status.php
parentaca8110ae9f52c81bc88e762fbaf9cb8f2d8d2ca (diff)
downloadpfsense-1425e067d6db9b41eafe67070742e3b466178053.zip
pfsense-1425e067d6db9b41eafe67070742e3b466178053.tar.gz
Merge in virtual IP code
This changeset does the following: merges proxy arp and carp setup menus removes proxy arp menu from left side upgrades config file from 1.7 to 1.8 moves existing carp virtual IP and proxy arp config to new <virtualip> tag removes server NAT (why duplicate work?)
Diffstat (limited to 'usr/local/www/carp_status.php')
-rwxr-xr-xusr/local/www/carp_status.php26
1 files changed, 13 insertions, 13 deletions
diff --git a/usr/local/www/carp_status.php b/usr/local/www/carp_status.php
index 73cc020..33aeca4 100755
--- a/usr/local/www/carp_status.php
+++ b/usr/local/www/carp_status.php
@@ -90,13 +90,18 @@ include("fbegin.inc");
echo "<input type=\"submit\" name=\"disablecarp\" id=\"disablecarp\" value=\"Disable Carp\">";
}
-if(!is_array($config['installedpackages']['carp']['config'])) {
+if(is_array($config['virtualip']['vip'])) {
+ foreach($config['virtualip']['vip'] as $carp) {
+ if ($carp['mode'] == "carp") $carpcount++;
+ }
+ if ($carpcount == 0) {
echo "</td></tr></table><center><br>Could not locate any defined CARP interfaces.";
echo "</center>";
include("fend.inc");
echo "</body></html>";
exit;
+ }
}
?>
@@ -111,21 +116,17 @@ if(!is_array($config['installedpackages']['carp']['config'])) {
</tr>
<?php
-if($config['installedpackages']['carp']['config'] <> "")
+if(is_array($config['virtualip']['vip'])) {
$carpint=0;
- foreach($config['installedpackages']['carp']['config'] as $carp) {
- $ipaddress = $carp['ipaddress'];
- $premption = $carp['premption'];
+ foreach($config['virtualip']['vip'] as $carp) {
+ if ($carp['mode'] != "carp") continue;
+ $ipaddress = $carp['subnet'];
$password = $carp['password'];
- $netmask = $carp['netmask'];
+ $netmask = $carp['subnet_bits'];
$vhid = $carp['vhid'];
$advskew = $carp['advskew'];
- $pfsync = $carp['pfsync'];
- $synciface = $carp['synciface'];
$carp_int = find_carp_interface($ipaddress);
$status = get_carp_interface_status($carp_int);
- if(isset($carp['balancing'])) $balancing = "true"; else $balancing = "false";
- if(isset($carp['premption'])) $premption = "true"; else $premption = "false";
echo "<tr>";
$align = "valign='middle'";
if($carp_enabled == false) {
@@ -147,7 +148,7 @@ if($config['installedpackages']['carp']['config'] <> "")
echo "</tr>";
$carpint++;
}
-
+}
?>
<tr><td>
<center>
@@ -171,5 +172,4 @@ Rounded("div#mainlevel","bl br","#FFF","#eeeeee","smooth");
</script>
</body>
-</html>
-
+</html> \ No newline at end of file
OpenPOWER on IntegriCloud