summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorgnhb <gnoahb@gmail.com>2010-06-15 12:30:47 +0700
committergnhb <gnoahb@gmail.com>2010-06-15 12:30:47 +0700
commit3de9ca1ccff795e22853c3162a5eed355d97ea08 (patch)
tree01b7fb826a9b4f74873cc523377b97dd9a9f53ab /etc
parent5d9d443a4175d82e205a69783336a5a9f377e71e (diff)
parentbd414316c1ef662f93d927a0eee2180686d0a43d (diff)
downloadpfsense-3de9ca1ccff795e22853c3162a5eed355d97ea08.zip
pfsense-3de9ca1ccff795e22853c3162a5eed355d97ea08.tar.gz
Merge branch 'master' of rcs.pfsense.org:pfsense/mainline
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/gwlb.inc10
-rw-r--r--etc/inc/interfaces.inc2
2 files changed, 7 insertions, 5 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;
}
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc
index fff7d1d..e45a991 100644
--- a/etc/inc/interfaces.inc
+++ b/etc/inc/interfaces.inc
@@ -855,7 +855,7 @@ function interface_bring_down($interface = "wan", $destroy = false) {
}
if ($destroy == true) {
- if (preg_match("/^vip/^tun|^ovpn|^gif|^gre|^lagg|^bridge|vlan/i", $realif))
+ if (preg_match("/^vip|^tun|^ovpn|^gif|^gre|^lagg|^bridge|vlan/i", $realif))
pfSense_interface_destroy($realif);
}
OpenPOWER on IntegriCloud