misc/144109: hostapd uses the MAC of the wireless interface,
but should use the BSSID.
efonnes at gmail.com
Fri Feb 19 14:40:01 UTC 2010
>Synopsis: hostapd uses the MAC of the wireless interface, but should use the BSSID.
>Arrival-Date: Fri Feb 19 14:40:00 UTC 2010
>Originator: Erik Fonnesbeck
FreeBSD bsd.local 8.0-RELEASE FreeBSD 8.0-RELEASE #0: Sat Nov 21 15:48:17 UTC 2009 root at almeida.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386
If the MAC address of a wireless interface is set to something that does not match its BSSID, WPA does not work. Another related bug is that if the wireless clone is named with the parent interface name at the start (for example, ath0_wlan0), WPA will not work if the MAC address of the parent does not match the BSSID of the clone. They are both part of the same issue because it should be using the BSSID and not the MAC address.
This may also affect wpa_supplicant.
Assign a different MAC address to a wireless clone interface and WPA does not work.
Or if you are naming the clones after the parent (ath0_wlan0, etc.):
If the parent's MAC address does not match the clone's BSSID, either from changing the parent's MAC or by having multiple clones created with the bssid option of ifconfig, WPA does not work.
In usr.sbin/wpa/l2_packet.c: eth_get, it needs to get the BSSID of the interface instead of its MAC. hostapd appears to only read this information once, at startup. WPA works correctly if the MAC address matched the BSSID when hostapd was started. Changing it afterward seems to have no effect.
In the case of reading the MAC from the wrong interface, hostapd works if the parent's MAC matches the clone's BSSID, even if the clone's MAC does not match, showing that the clone's MAC does not need to match its BSSID for hostapd to function.
There is code for getting the BSSID in ifconfig's source code, though it is scattered a bit.
More information about the freebsd-bugs