summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2006-04-14 21:55:53 +0000
committerScott Ullrich <sullrich@pfsense.org>2006-04-14 21:55:53 +0000
commit43ea32f930731661679af09df1208393a2278974 (patch)
tree943cd92d94c963bb2cd8e5136cd2ed91ab5ab104
parent2b01a0866d551d163d9967595ef253aa652c988a (diff)
downloadpfsense-43ea32f930731661679af09df1208393a2278974.zip
pfsense-43ea32f930731661679af09df1208393a2278974.tar.gz
Add ping support. Not tested, not mother approved.
-rw-r--r--etc/inc/vslb.inc27
1 files changed, 26 insertions, 1 deletions
diff --git a/etc/inc/vslb.inc b/etc/inc/vslb.inc
index cfb8927..0a1a6ce 100644
--- a/etc/inc/vslb.inc
+++ b/etc/inc/vslb.inc
@@ -37,7 +37,7 @@ function slbd_configure() {
global $config, $g;
$a_vs = &$config['load_balancer']['virtual_server'];
- $a_pool = &$config['load_balancer']['pool'];
+ $a_pool = &$config['load_balancer']['lbpool'];
$should_start=0;
@@ -81,6 +81,31 @@ function slbd_configure() {
$should_start=1;
}
}
+
+ /* handle pool entries */
+ if(is_array($a_pool)) {
+ foreach ($a_pool as $lbpool) {
+ if($lbpool['type'] <> "gateway")
+ continue;
+
+ if ($lbpool['desc'] == "")
+ $slbdconf .= "{$lbpool['name']}:\\\n";
+ else
+ $slbdconf .= "{$lbpool['name']}|{$lbpool['desc']}:\\\n";
+
+ /* pool name */
+ $slbdconf .= "\t:poolname={$lbpool['name']}:\\\n";
+ /* virtual IP */
+ $slbdconf .= "\t:vip={$lbpool['ipaddr']}:\\\n";
+ /* fallback port */
+ $slbdconf .= "\t:sitedown-port={$lbpool['port']}:\\\n";
+ /* setup ping status */
+ $slbdconf .= "\t:ping={$lbpool['monitorip']}:\\\n";
+
+ $should_start = 1;
+ }
+ }
+
if($should_start == 1) {
fwrite($fd, $slbdconf);
OpenPOWER on IntegriCloud