From 2a48a8853383bceafd25eb745900d15f184a9e12 Mon Sep 17 00:00:00 2001 From: Erik Fonnesbeck Date: Fri, 19 Feb 2010 05:07:26 -0700 Subject: Revert "Workaround for a hostapd bug that it uses the base interface's MAC instead of the clone's BSSID, preventing proper authorization on auxillary clones." This reverts commit fa13098bf03f83abb3279f3d8885108c8d3b64a7 and subsequent related commits. --- etc/inc/interfaces.inc | 30 ++++-------------------------- 1 file changed, 4 insertions(+), 26 deletions(-) (limited to 'etc') diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc index c5a324e..c2b4bd1 100644 --- a/etc/inc/interfaces.inc +++ b/etc/inc/interfaces.inc @@ -1663,34 +1663,22 @@ EOD; $standard_no_turbo = str_replace(" Turbo", "", $standard); - /* configure wireless */ - $wlcmd_args = implode(" ", $wlcmd); - mwexec("/sbin/ifconfig {$if} $wlcmd_args", false); - if (isset($wlcfg['wpa']['enable'])) { if ($wlcfg['mode'] == "bss") { fwrite($fd_set, "{$wpa_supplicant} -B -i {$if} -c {$g['varetc_path']}/wpa_supplicant_{$if}.conf\n"); } if ($wlcfg['mode'] == "hostap") { - $baseif = substr($if, 0, stripos($if, "_wlan")); - $baseif_mac = get_interface_mac($baseif); - sleep(1); - $if_bssid = get_interface_bssid($if); - if(!is_macaddr($if_bssid)) { - $if_bssid = get_interface_mac($if); - } - /* XXX: Workaround because hostapd won't properly detect BSSID of - * clone interfaces and uses base interface's MAC instead - * wpa_supplicant may also need this, but that needs to be tested */ - fwrite($fd_set, "/sbin/ifconfig {$baseif} ether {$if_bssid}\n"); fwrite($fd_set, "{$hostapd} -B {$g['varetc_path']}/hostapd_{$if}.conf\n"); - fwrite($fd_set, "/sbin/ifconfig {$baseif} ether {$baseif_mac}\n"); } } fclose($fd_set); conf_mount_ro(); + /* configure wireless */ + $wlcmd_args = implode(" ", $wlcmd); + mwexec("/sbin/ifconfig {$if} $wlcmd_args", false); + sleep(1); /* execute hostapd and wpa_supplicant if required in shell */ @@ -2937,16 +2925,6 @@ function get_interface_mac($interface) { return $macinfo["macaddr"]; } -function get_interface_bssid($interface) { - $mac = array(); - exec("/sbin/ifconfig {$interface} | /usr/bin/awk '/bssid/ {print \$NF}'", $mac); - if(is_macaddr($mac[0])) { - return trim($mac[0]); - } else { - return ""; - } -} - /****f* pfsense-utils/generate_random_mac_address * NAME * generate_random_mac - generates a random mac address -- cgit v1.1