diff options
author | Seth Mos <seth.mos@xs4all.nl> | 2008-11-01 18:50:29 +0000 |
---|---|---|
committer | Seth Mos <seth.mos@xs4all.nl> | 2008-11-01 18:50:29 +0000 |
commit | eb1ce5ee9d6bbaf8fa1a2a924ee811369623e3b6 (patch) | |
tree | 2fd1bc18a702447c76aa7e06753cca4a1d447271 | |
parent | f5572f3d55fc4325ff5b8b1b4023cae40b87e8e2 (diff) | |
download | pfsense-eb1ce5ee9d6bbaf8fa1a2a924ee811369623e3b6.zip pfsense-eb1ce5ee9d6bbaf8fa1a2a924ee811369623e3b6.tar.gz |
Fix adding static entries to array.
Skip static entries from polluting the dynamic array
-rw-r--r-- | etc/inc/gwlb.inc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/etc/inc/gwlb.inc b/etc/inc/gwlb.inc index f2472a7..a58fbc5 100644 --- a/etc/inc/gwlb.inc +++ b/etc/inc/gwlb.inc @@ -223,10 +223,14 @@ function return_gateways_array() { $iflist = get_interface_list(); foreach($iflist as $ifname => $if ) { $gateway = array(); + $friendly = convert_real_interface_to_friendly_interface_name($ifname); + if(is_ipaddr($config[$friendly]['gateway'])) { + /* static configs are automatically from the array */ + continue; + } if(interface_has_gateway($ifname)) { $gateway['gateway'] = get_interface_gateway($ifname); $gateway['interface'] = $ifname; - $friendly = convert_real_interface_to_friendly_interface_name($ifname); $descr = convert_friendly_interface_to_friendly_descr($friendly); /* Loopback for dynamic interfaces without a IP */ if(!is_ipaddr($gateway['gateway'])) { @@ -248,10 +252,9 @@ function return_gateways_array() { $gateway['monitor'] = $gateway['gateway']; } $gateway['modifier'] = "writeable"; + $gateways_arr[] = $gateway; } - $gateways_arr[] = $gateway; } - return($gateways_arr); } |