From d3c269d3933f71a24f60375f56fdf67a7194ace1 Mon Sep 17 00:00:00 2001 From: Ermal Date: Mon, 10 Nov 2014 16:15:08 +0100 Subject: [PATCH] Make some more useful checks here --- etc/inc/gwlb.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/etc/inc/gwlb.inc b/etc/inc/gwlb.inc index cfbfcc595..c2c61d066 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");