From 1425e067d6db9b41eafe67070742e3b466178053 Mon Sep 17 00:00:00 2001 From: Bill Marquette Date: Wed, 13 Jul 2005 03:09:18 +0000 Subject: 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 tag removes server NAT (why duplicate work?) --- usr/local/www/carp_status.php | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'usr/local/www/carp_status.php') 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 ""; } -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 "

Could not locate any defined CARP interfaces."; echo "
"; include("fend.inc"); echo ""; exit; + } } ?> @@ -111,21 +116,17 @@ if(!is_array($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 ""; $align = "valign='middle'"; if($carp_enabled == false) { @@ -147,7 +148,7 @@ if($config['installedpackages']['carp']['config'] <> "") echo ""; $carpint++; } - +} ?>
@@ -171,5 +172,4 @@ Rounded("div#mainlevel","bl br","#FFF","#eeeeee","smooth"); - - + \ No newline at end of file -- cgit v1.1