summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2010-06-14 19:26:32 +0000
committerErmal <eri@pfsense.org>2010-06-14 19:26:32 +0000
commit2f92b34db07b57ad7d4232dc2a30f8785a907186 (patch)
tree276fbdef7c02aedceafc829e8a4537dbcfc1a4a2 /etc
parentea5f6c955b46ec8f98bb06a7cbab5e14092152d0 (diff)
downloadpfsense-2f92b34db07b57ad7d4232dc2a30f8785a907186.zip
pfsense-2f92b34db07b57ad7d4232dc2a30f8785a907186.tar.gz
Give apinger the new srcip dircetive so it does not struggle anymore with the routing table.
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/gwlb.inc10
1 files changed, 6 insertions, 4 deletions
diff --git a/etc/inc/gwlb.inc b/etc/inc/gwlb.inc
index 20f049c..4e19e2b 100644
--- a/etc/inc/gwlb.inc
+++ b/etc/inc/gwlb.inc
@@ -162,6 +162,10 @@ EOD;
$apingercfg .= "target \"{$gateway['monitor']}\" {\n";
$apingercfg .= " description \"{$gateway['name']}\"\n";
+ $gwifip = find_interface_ip($gateway['interface']);
+ if (!is_ipaddr($gwifip))
+ continue; //Skip this target
+ $apingercfg .= " srcip \"{$gwifip}\"\n";
$alarms = "";
$override = false;
if (!empty($gwref['lowloss'])) {
@@ -217,9 +221,7 @@ EOD;
* route as this will break the routing table */
continue;
} else {
- if (!empty($gateway_status[$gateway['monitor']]) && $gateway_status[$gateway['monitor']]['status'] == "down")
- ; /* This check makes sure that we do not delete previous routes. */
- else if ($gateway['gateway'] != "dynamic" && is_ipaddr($gateway['gateway'])) {
+ if ($gateway['gateway'] != "dynamic" && is_ipaddr($gateway['gateway'])) {
mwexec("/sbin/route delete -host " . escapeshellarg($gateway['monitor']));
mwexec("/sbin/route add -host " . escapeshellarg($gateway['monitor']) .
" " . escapeshellarg($gateway['gateway']));
@@ -393,7 +395,7 @@ function return_gateway_groups_array() {
} else {
$tiers[$tier][] = $gwname;
}
- } elseif (stristr($status['status'], "none")) {
+ } elseif ($status['status'] == "none")) {
/* Online add member */
$tiers[$tier][] = $gwname;
}
OpenPOWER on IntegriCloud