diff options
author | Seth Mos <seth.mos@xs4all.nl> | 2008-09-15 17:41:00 +0000 |
---|---|---|
committer | Seth Mos <seth.mos@xs4all.nl> | 2008-09-15 17:41:00 +0000 |
commit | 24461604268e49d9bae26efb73d1952dd9ad685d (patch) | |
tree | d71c366cc2b874989614e8ab28131b4110fa2e72 /etc/inc | |
parent | fed043ef9a34773d365ddc912539ef348ced478c (diff) | |
download | pfsense-24461604268e49d9bae26efb73d1952dd9ad685d.zip pfsense-24461604268e49d9bae26efb73d1952dd9ad685d.tar.gz |
Fix Wireless detection logic
Diffstat (limited to 'etc/inc')
-rw-r--r-- | etc/inc/pfsense-utils.inc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc index 7176af7..49ce3a6 100644 --- a/etc/inc/pfsense-utils.inc +++ b/etc/inc/pfsense-utils.inc @@ -1187,15 +1187,15 @@ function get_interface_mtu($interface) { function is_interface_wireless($interface) { global $config, $g; $friendly = convert_real_interface_to_friendly_interface_name($interface); - if (preg_match($g['wireless_regex'], $interface)) { - $config['interfaces'][$friendly]['wireless'] = array(); - } else { + if(!is_array($config['interfaces'][$friendly]['wireless'])) { + if (preg_match($g['wireless_regex'], $interface)) { + $config['interfaces'][$friendly]['wireless'] = array(); + return true; + } unset($config['interfaces'][$friendly]['wireless']); - } - if(isset($config['interfaces'][$friendly]['wireless'])) { - return true; - } else { return false; + } else { + return true; } } |