diff options
author | Renato Botelho <renato@netgate.com> | 2018-09-18 18:40:47 -0300 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2018-09-18 18:40:47 -0300 |
commit | 51c3546dd77b9efbd53ace478b991ea530bc0a98 (patch) | |
tree | eb9ab8df6f0eb6c98fec73337ace90ad3d28f1a8 /src/etc | |
parent | da266efdbcddadbccbefce3b62ea2783496463b2 (diff) | |
download | pfsense-51c3546dd77b9efbd53ace478b991ea530bc0a98.zip pfsense-51c3546dd77b9efbd53ace478b991ea530bc0a98.tar.gz |
Fix #8910: Restore older versions behaviour and consider 'wan' interface as primary default gateway
Diffstat (limited to 'src/etc')
-rw-r--r-- | src/etc/inc/gwlb.inc | 7 |
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; |