summaryrefslogtreecommitdiffstats
path: root/src/etc
diff options
context:
space:
mode:
Diffstat (limited to 'src/etc')
-rw-r--r--src/etc/inc/gwlb.inc7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/etc/inc/gwlb.inc b/src/etc/inc/gwlb.inc
index c9b4cd1..3bba7d3 100644
--- a/src/etc/inc/gwlb.inc
+++ b/src/etc/inc/gwlb.inc
@@ -545,6 +545,13 @@ function return_gateways_status_text($byname = false, $brief = false) {
}
function compare_gateway_order_configured($a, $b) {
+ /* XXX WAN always has precedence */
+ if ($a['friendlyiface'] == "wan") {
+ return -1;
+ } elseif ($b['friendlyiface'] == "wan") {
+ return 1;
+ }
+
if ($a['attribute'] === $b['attribute']) {
if ($a['attribute'] === 'system') {
$res = (($a['name'] < $b['name'])) ? -1 : 1;
OpenPOWER on IntegriCloud