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.inc16
1 files changed, 16 insertions, 0 deletions
diff --git a/etc/inc/gwlb.inc b/etc/inc/gwlb.inc
index 4e9ca84..f842857 100644
--- a/etc/inc/gwlb.inc
+++ b/etc/inc/gwlb.inc
@@ -383,6 +383,14 @@ function return_gateways_array($disabled = false, $localhost = false) {
$gateway['gateway'] = "dynamic";
$gateway['dynamic'] = true;
break;
+ default:
+ $gateway['ipprotocol'] = "inet";
+ $gateway['gateway'] = get_interface_gateway($gateway['interface']);
+ /* no IP address found, set to dynamic */
+ if (!is_ipaddrv4($gateway['gateway']))
+ $gateway['gateway'] = "dynamic";
+ $gateway['dynamic'] = true;
+ break;
}
}
@@ -403,6 +411,14 @@ function return_gateways_array($disabled = false, $localhost = false) {
$gateway['gateway'] = "dynamic6";
$gateway['dynamic'] = true;
break;
+ default:
+ $gateway['ipprotocol'] = "inet6";
+ $gateway['gateway'] = get_interface_gateway_v6($gateway['interface']);
+ /* no IPv6 address found, set to dynamic6 */
+ if (!is_ipaddrv6($gateway['gateway']))
+ $gateway['gateway'] = "dynamic6";
+ $gateway['dynamic'] = true;
+ break;
}
}
} else {
OpenPOWER on IntegriCloud