diff options
author | Ermal Luçi <eri@pfsense.org> | 2010-01-18 20:55:13 +0000 |
---|---|---|
committer | Ermal Luçi <eri@pfsense.org> | 2010-01-18 20:55:13 +0000 |
commit | a25327390213285c15c50c88d94c9d8abdb7ccd6 (patch) | |
tree | 8fb701ffb7d2ac8fce909d75788f6bdf73df6f72 /etc | |
parent | 38936dc72ab47d70c679d088e09ee0096206c070 (diff) | |
download | pfsense-a25327390213285c15c50c88d94c9d8abdb7ccd6.zip pfsense-a25327390213285c15c50c88d94c9d8abdb7ccd6.tar.gz |
Ticket #305. Grey out the gateway when it is a dynamic one.
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/gwlb.inc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/etc/inc/gwlb.inc b/etc/inc/gwlb.inc index fcffdc2..0c8b3b7 100644 --- a/etc/inc/gwlb.inc +++ b/etc/inc/gwlb.inc @@ -275,6 +275,7 @@ function return_gateways_array($disabled = false) { if(! is_ipaddr($gateway['gateway'])) { $gateway['gateway'] = "dynamic"; } + $gateway['dynamic'] = true; } if($gateway['monitor'] == "") { $gateway['monitor'] = $gateway['gateway']; @@ -292,7 +293,8 @@ function return_gateways_array($disabled = false) { continue; } $gateway = array(); - $gateway['gateway'] = get_interface_gateway($ifname); + $gateway['dynamic'] = false; + $gateway['gateway'] = get_interface_gateway($ifname, $gateway['dynamic']); $gateway['interface'] = get_real_interface($ifname); $gateway['name'] = "{$ifname}"; $gateway['attribute'] = "system"; @@ -494,7 +496,7 @@ function lookup_gateway_interface_by_name($name) { return(false); } -function get_interface_gateway($interface) { +function get_interface_gateway($interface, &$dynamic = false) { global $config, $g; $iflist = get_configured_interface_with_descr(); @@ -524,6 +526,7 @@ function get_interface_gateway($interface) { if (file_exists("{$g['tmp_path']}/{$realif}_router")) { $gw = file_get_contents("{$g['tmp_path']}/{$realif}_router"); $gw = rtrim($gw); + $dynamic = true; } } |