hostapd with 2 physical adapters, 2 bss's each, wlan1_0 gets wrong hwaddr
lists at jnielsen.net
Thu May 12 22:10:16 EDT 2011
Running hostapd 7.3 from source on Fedora 14 x86.
I have two ath9k adapters in the same machine and would like to run two VAP's (bss's) on each. Everything looks like it works fine, but the 2nd VAP on the 2nd card invariably gets the same MAC address as the 2nd VAP on the 1st card. Stations can see all of the SSID's but the fact that 2 of them have the same MAC address confuses them sooner or later.
Here are my command line, config files, and partial ifconfig output:
# hostapd -B /etc/hostapd/wlan0.conf /etc/hostapd/wlan1.conf
# cat /etc/hostapd/wlan?.conf
### wlan0.conf ###
### wlan1.conf ###
# ifconfig -a|grep wlan
mon.wlan0 Link encap:UNSPEC HWaddr 00-0B-6B-02-07-7E-11-2A-00-00-00-00-00-00-00-00
mon.wlan1 Link encap:UNSPEC HWaddr 00-1B-B1-5D-B0-6C-11-2A-00-00-00-00-00-00-00-00
wlan0 Link encap:Ethernet HWaddr 00:0B:6B:02:07:7E
wlan0_0 Link encap:Ethernet HWaddr 04:0B:6B:02:07:7E
wlan1 Link encap:Ethernet HWaddr 00:1B:B1:5D:B0:6C
wlan1_0 Link encap:Ethernet HWaddr 04:0B:6B:02:07:7E
Notice wlan0_0 has the address specified for it in the config file and wlan1_0 has the same one (not the one configured for it). If I run only one VAP on either card there is no problem. If I run 3 VAP's on both cards the third ones work fine (wlan0_1 and wlan1_1 both have the addresses specified for them), but the 2nd one on the 2nd card (wlan1_0) still has the same MAC address as the 2nd one on the 1st card (wlan0_0).
If I change the order of the config files on the command line the problem is still with the second one specified.
If I don't specify my own bssid for any of the VAP's the problem persists--wlan0_0 gets an auto-masked bssid and wlan1_0 gets the same one.
Interestingly the debug output from hostapd shows the correct MAC address for all VAP's, including wlan1_0. Hostapd.c line 545:
wpa_printf(MSG_ERROR, "Using interface %s with hwaddr " MACSTR
" and ssid '%s'",
I had a go at looking through the rest of the code but I haven't pinned down yet where the addr might get twiddled.
Can anyone shed some light on what might be going on? Duplicate this behavior? Give me pointers on debugging? (hoping not to have to set up gdb on this box, but it might be doable if nothing more straightforward presents itself.)
More information about the HostAP