diff options
author | Ermal <eri@pfsense.org> | 2010-09-16 17:44:31 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2010-09-16 17:44:31 +0000 |
commit | 999111cb73957679debbe5831e1b7d01c3985b1f (patch) | |
tree | 71bab9909b7bf4752ec6840be3e2a2f7c9ea61c4 /etc/inc/gwlb.inc | |
parent | 2f36abb869c012ae3d46fe173014c93015a54a11 (diff) | |
download | pfsense-999111cb73957679debbe5831e1b7d01c3985b1f.zip pfsense-999111cb73957679debbe5831e1b7d01c3985b1f.tar.gz |
Make it possible to show default against dynamic gateway names in the GUI.
Diffstat (limited to 'etc/inc/gwlb.inc')
-rw-r--r-- | etc/inc/gwlb.inc | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/etc/inc/gwlb.inc b/etc/inc/gwlb.inc index 43f7e20..904691a 100644 --- a/etc/inc/gwlb.inc +++ b/etc/inc/gwlb.inc @@ -313,9 +313,13 @@ function return_gateways_array($disabled = false) { $gateway['name'] = $friendly; $gateway['attribute'] = "system"; + if ($gateway['dynamic'] == "default") { + $gateway['defaultgw'] = true; + $gateway['dynamic'] = true; + } /* Loopback dummy for dynamic interfaces without a IP */ - if(!is_ipaddr($gateway['gateway']) && $gateway['dynamic'] == true) - $gateway['gateway'] = "dynamic"; + if (!is_ipaddr($gateway['gateway']) && $gateway['dynamic'] == true) + $gateway['gateway'] = "dynamic"; /* automatically skip known static and dynamic gateways we have a array entry for */ foreach($gateways_arr as $gateway_item) { @@ -505,7 +509,10 @@ function get_interface_gateway($interface, &$dynamic = false) { $realif = get_real_interface($interface); if (file_exists("{$g['tmp_path']}/{$realif}_router")) { $gw = trim(file_get_contents("{$g['tmp_path']}/{$realif}_router"), " \n"); - $dynamic = true; + if (file_exists("{$g['tmp_path']}/{$realif}_defaultgw")) + $dynamic = "default"; + else + $dynamic = true; } } |