summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--etc/inc/gwlb.inc7
1 files changed, 7 insertions, 0 deletions
diff --git a/etc/inc/gwlb.inc b/etc/inc/gwlb.inc
index 904691a..5217e9b 100644
--- a/etc/inc/gwlb.inc
+++ b/etc/inc/gwlb.inc
@@ -286,6 +286,13 @@ function return_gateways_array($disabled = false) {
$gateway['friendlyiface'] = $gateway['interface'];
$gateway['interface'] = get_real_interface($gateway['interface']);
+ /* Some interface like wan might be default but have no info recorded
+ * the config.
+ */
+ if ($gateway['friendlyiface'] == "wan" && !isset($gateway['defaultgw'])) {
+ if (file_exists("{$g['tmp_path']}/{$gateway['interface']}_defaultgw"))
+ $gateway['defaultgw'] = true;
+ }
/* include the gateway index as the attribute */
$gateway['attribute'] = $i;
OpenPOWER on IntegriCloud