summaryrefslogtreecommitdiffstats
path: root/etc/inc/gwlb.inc
diff options
context:
space:
mode:
Diffstat (limited to 'etc/inc/gwlb.inc')
-rw-r--r--etc/inc/gwlb.inc6
1 files changed, 3 insertions, 3 deletions
diff --git a/etc/inc/gwlb.inc b/etc/inc/gwlb.inc
index 94ce050..92eaf28 100644
--- a/etc/inc/gwlb.inc
+++ b/etc/inc/gwlb.inc
@@ -163,11 +163,11 @@ EOD;
* route as this will break the routing table */
continue;
} else {
- mwexec("/sbin/route delete -host " . escapeshellarg($gateway['monitor']));
- if(! stristr("127.0.0", $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']));
- log_error("Removing static route for monitor {$gateway['monitor']} and adding a new route through {$gateway['gateway']}");
+ log_error("Removing static route for monitor {$gateway['monitor']} and adding a new route through {$gateway['gateway']}");
}
}
}
OpenPOWER on IntegriCloud