summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2014-11-10 16:15:08 +0100
committerErmal <eri@pfsense.org>2014-11-10 16:15:08 +0100
commitd3c269d3933f71a24f60375f56fdf67a7194ace1 (patch)
tree2a091fe255c11883e3090c448c6146fd9c13be44
parent6704590b35ed61ee742975f53a063b8f431e5fe9 (diff)
downloadpfsense-d3c269d3933f71a24f60375f56fdf67a7194ace1.zip
pfsense-d3c269d3933f71a24f60375f56fdf67a7194ace1.tar.gz
Make some more useful checks here
-rw-r--r--etc/inc/gwlb.inc4
1 files changed, 2 insertions, 2 deletions
diff --git a/etc/inc/gwlb.inc b/etc/inc/gwlb.inc
index cfbfcc5..c2c61d0 100644
--- a/etc/inc/gwlb.inc
+++ b/etc/inc/gwlb.inc
@@ -966,7 +966,7 @@ function get_interface_gateway($interface, &$dynamic = false) {
}
// for dynamic interfaces we handle them through the $interface_router file.
- if (!is_ipaddrv4($gw) && !is_ipaddrv4($gwcfg['ipaddr'])) {
+ if (($gw == NULL || !is_ipaddrv4($gw)) && !is_ipaddrv4($gwcfg['ipaddr'])) {
$realif = get_real_interface($interface);
if (file_exists("{$g['tmp_path']}/{$realif}_router")) {
$gw = trim(file_get_contents("{$g['tmp_path']}/{$realif}_router"), " \n");
@@ -996,7 +996,7 @@ function get_interface_gateway_v6($interface, &$dynamic = false) {
}
// for dynamic interfaces we handle them through the $interface_router file.
- if (!is_ipaddrv6($gw) && !is_ipaddrv6($gwcfg['ipaddrv6'])) {
+ if (($gw == NULL || !is_ipaddrv6($gw)) && !is_ipaddrv6($gwcfg['ipaddrv6'])) {
$realif = get_real_interface($interface);
if (file_exists("{$g['tmp_path']}/{$realif}_routerv6")) {
$gw = trim(file_get_contents("{$g['tmp_path']}/{$realif}_routerv6"), " \n");
OpenPOWER on IntegriCloud