Make some more useful checks here
This commit is contained in:
parent
6704590b35
commit
d3c269d393
|
@ -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");
|
||||
|
|
Reference in New Issue