diff options
author | Ermal <eri@pfsense.org> | 2013-02-11 10:19:33 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2013-02-11 10:19:33 +0000 |
commit | 8ac9dd5e4aafbc22932671fa57e13288759b04ed (patch) | |
tree | 81c92b74c3ab0bad6245ce18c70cccaff3a27a2c /etc | |
parent | 25f27029abb7eae043a2af22bd35ce4ae0ab51f6 (diff) | |
download | pfsense-8ac9dd5e4aafbc22932671fa57e13288759b04ed.zip pfsense-8ac9dd5e4aafbc22932671fa57e13288759b04ed.tar.gz |
Optimize get_real_itnerface to avoid a loop of doing a convertion from real back to friendly when the inforamtion is there already
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/interfaces.inc | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc index 14368d3..f00beda 100644 --- a/etc/inc/interfaces.inc +++ b/etc/inc/interfaces.inc @@ -3788,12 +3788,10 @@ function get_real_interface($interface = "wan") { // Wireless cloned NIC support (FreeBSD 8+) // interface name format: $parentnic_wlanparentnic# // example: ath0_wlan0 - if (is_interface_wireless($cfg['if'])) { + if( is_array($cfg['wireless']) || preg_match($g['wireless_regex'], $cfg['if'])) $wanif = interface_get_wireless_clone($cfg['if']); - break; - } - - $wanif = $cfg['if']; + else + $wanif = $cfg['if']; break; } |