Multiple BSSes specified in BSS-config

I'm facing these log messages on a tl-wdr4300 (trunk):

Fri May  1 06:56:48 2020 daemon.notice hostapd: Configuration file: /var/run/hostapd-phy0.conf (phy nw0-1)
Fri May  1 06:56:48 2020 daemon.err hostapd: Multiple BSSes specified in BSS-config
Fri May  1 06:56:48 2020 daemon.notice netifd: radio24_0 (26729): Command failed: Invalid argument
Fri May  1 06:56:48 2020 daemon.notice netifd: radio24_0 (26729): WARNING (wireless_add_process): executable path /usr/sbin/wpad does not match process  path (/proc/exe)
Fri May  1 06:56:48 2020 daemon.notice netifd: radio24_0 (26729): Command failed: Invalid argument
Fri May  1 06:56:49 2020 daemon.notice hostapd: Configuration file: /var/run/hostapd-phy1.conf (phy nw1-1)
Fri May  1 06:56:49 2020 daemon.err hostapd: Multiple BSSes specified in BSS-config
Fri May  1 06:56:49 2020 daemon.notice netifd: radio5_0 (26737): Command failed: Invalid argument
Fri May  1 06:56:49 2020 daemon.notice netifd: radio5_0 (26737): WARNING (wireless_add_process): executable path /usr/sbin/wpad does not match process  path (/proc/exe)
Fri May  1 06:56:49 2020 daemon.notice netifd: radio5_0 (26737): Command failed: Invalid argument

the configuration is generated from /etc/config/wireless.
does anyone have an idea what could be going wrong?

uci wireless:


config wifi-device 'radio24_0'
	option type 'mac80211'
	option channel '11'
	option hwmode '11g'
	option path 'platform/ahb/18100000.wmac'
	option htmode 'HT20'
	option country 'DE'
	option phyref 'phy0'

config wifi-device 'radio5_0'
	option type 'mac80211'
	option channel '36'
	option hwmode '11a'
	option path 'pci0000:00/0000:00:00.0'
	option country 'DE'
	option phyref 'phy1'
	option htmode 'HT40'

config wifi-iface 'w0_1'
	option mode 'ap'
	option ifname 'nw0-1'
	option device 'radio24_0'
	option network 'n_1'
	option encryption 'psk2'
	option isolate '0'
	option hidden '0'
	option key 'xxxxxxxx'
	option ssid 'mpsk test'

config wifi-iface 'w1_1'
	option mode 'ap'
	option ifname 'nw1-1'
	option device 'radio5_0'
	option network 'n_1'
	option encryption 'psk2'
	option isolate '0'
	option hidden '0'
	option key 'xxxxxxxx'
	option ssid 'mpsk test'

config wifi-iface 'w0_47f'
	option mode 'ap'
	option ifname 'w0-47f'
	option device 'radio24_0'
	option network 'n_734'
	option encryption 'none'
	option isolate '1'
	option hidden '0'
	option ssid 'prod open'

config wifi-iface 'w1_47f'
	option mode 'ap'
	option ifname 'w1-47f'
	option device 'radio5_0'
	option network 'n_734'
	option encryption 'none'
	option isolate '1'
	option hidden '0'
	option ssid 'prod open'

config wifi-iface 'w0_8ed'
	option mode 'ap'
	option ifname 'w0-8ed'
	option device 'radio24_0'
	option network 'n_1'
	option encryption 'psk2'
	option isolate '0'
	option hidden '0'
	option key 'xxxxxxxxxxxx'
	option ssid 'private'

config wifi-iface 'w1_8ed'
	option mode 'ap'
	option ifname 'w1-8ed'
	option device 'radio5_0'
	option network 'n_1'
	option encryption 'psk2'
	option isolate '0'
	option hidden '0'
	option key 'xxxxxxxxxxxx'
	option ssid 'private'

config wifi-iface 'w0_98a'
	option mode 'ap'
	option ifname 'w0-98a'
	option device 'radio24_0'
	option network 'n_734'
	option encryption 'psk2'
	option isolate '1'
	option hidden '0'
	option key 'xxxxxxxxxxxx'
	option ssid 'Wehlan'

config wifi-iface 'w1_98a'
	option mode 'ap'
	option ifname 'w1-98a'
	option device 'radio5_0'
	option network 'n_734'
	option encryption 'psk2'
	option isolate '1'
	option hidden '0'
	option key 'xxxxxxxxxxxx'
	option ssid 'Wehlan'

config wifi-iface 'w0_9'
	option mode 'ap'
	option ifname 'w0-9'
	option device 'radio24_0'
	option network 'n_1'
	option encryption 'psk2'
	option isolate '0'
	option hidden '0'
	option key 'xxxxxxxxxxx'
	option ssid 'schedule'

config wifi-iface 'w1_9'
	option mode 'ap'
	option ifname 'w1-9'
	option device 'radio5_0'
	option network 'n_1'
	option encryption 'psk2'
	option isolate '0'
	option hidden '0'
	option key 'xxxxxxxxxxx'
	option ssid 'schedule'

config wifi-iface 'mesh0'
	option ifname 'mesh0'
	option device 'radio24_0'
	option network 'mesh0'
	option mode 'adhoc'
	option encryption 'psk2'
	option ssid 'nom'
	option bssid '02:BA:CC:11:55:90'
	option key 'xxxxxxxxxxxxxxxx'

config wifi-iface 'mesh1'
	option ifname 'mesh1'
	option device 'radio5_0'
	option network 'mesh1'
	option mode 'adhoc'
	option encryption 'psk2'
	option ssid 'nom'
	option bssid '02:BA:CC:11:55:90'
	option key 'xxxxxxxxxxxxxxxx'


hostapd-phy0.conf:

driver=nl80211
logger_syslog=127
logger_syslog_level=2
logger_stdout=127
logger_stdout_level=2
country_code=DE
ieee80211d=1
hw_mode=g
beacon_int=100
dtim_period=2
channel=11

noscan=1

ieee80211n=1
ht_coex=0
ht_capab=[LDPC][SHORT-GI-20][SHORT-GI-40][TX-STBC][RX-STBC1][DSSS_CCK-40]

radio_config_id=836304575238177feb8d5b96dd3db342
interface=nw0-1
ctrl_interface=/var/run/hostapd
ap_isolate=1
bss_load_update_period=60
chan_util_avg_period=600
disassoc_low_ack=1
preamble=1
wmm_enabled=1
ignore_broadcast_ssid=0
uapsd_advertisement_enabled=1
utf8_ssid=1
multi_ap=0
wpa_passphrase=xxxxxxxx
auth_algs=1
wpa=2
wpa_pairwise=CCMP
ssid=mpsk test
bridge=br-n_1
wpa_disable_eapol_key_retries=0
wpa_key_mgmt=WPA-PSK
okc=0
disable_pmksa_caching=1
config_id=111530b7ee9c5b9024ba3bd80980e101
bssid=xx:xx:xx:xx:xx:xx


bss=w0-47f
ctrl_interface=/var/run/hostapd
ap_isolate=1
bss_load_update_period=60
chan_util_avg_period=600
disassoc_low_ack=1
preamble=1
wmm_enabled=1
ignore_broadcast_ssid=0
uapsd_advertisement_enabled=1
utf8_ssid=1
multi_ap=0
auth_algs=1
wpa=0
ssid=prod open
bridge=br-n_734
config_id=0ac707c8583cb415426777e8cad64e88
bssid=xx:xx:xx:xx:xx:xx


bss=w0-8ed
ctrl_interface=/var/run/hostapd
ap_isolate=1
bss_load_update_period=60
chan_util_avg_period=600
disassoc_low_ack=1
preamble=1
wmm_enabled=1
ignore_broadcast_ssid=0
uapsd_advertisement_enabled=1
utf8_ssid=1
multi_ap=0
wpa_passphrase=xxxxxxxxxxxx
auth_algs=1
wpa=2
wpa_pairwise=CCMP
ssid=private
bridge=br-n_1
wpa_disable_eapol_key_retries=0
wpa_key_mgmt=WPA-PSK
okc=0
disable_pmksa_caching=1
config_id=883933ec3e12f654b0c0c0ee200ecf47
bssid=xx:xx:xx:xx:xx:xx


bss=w0-98a
ctrl_interface=/var/run/hostapd
ap_isolate=1
bss_load_update_period=60
chan_util_avg_period=600
disassoc_low_ack=1
preamble=1
wmm_enabled=1
ignore_broadcast_ssid=0
uapsd_advertisement_enabled=1
utf8_ssid=1
multi_ap=0
wpa_passphrase=xxxxxxxxxxxx
auth_algs=1
wpa=2
wpa_pairwise=CCMP
ssid=Wehlan
bridge=br-n_734
wpa_disable_eapol_key_retries=0
wpa_key_mgmt=WPA-PSK
okc=0
disable_pmksa_caching=1
config_id=41e596dcb0ac98d3e65e52aa21019f51
bssid=xx:xx:xx:xx:xx:xx


bss=w0-9
ctrl_interface=/var/run/hostapd
ap_isolate=1
bss_load_update_period=60
chan_util_avg_period=600
disassoc_low_ack=1
preamble=1
wmm_enabled=1
ignore_broadcast_ssid=0
uapsd_advertisement_enabled=1
utf8_ssid=1
multi_ap=0
wpa_passphrase=xxxxxxxxxxx
auth_algs=1
wpa=2
wpa_pairwise=CCMP
ssid=schedule
bridge=br-n_1
wpa_disable_eapol_key_retries=0
wpa_key_mgmt=WPA-PSK
okc=0
disable_pmksa_caching=1
config_id=7797cdc22e5d00620c86cda232f130ab
bssid=xx:xx:xx:xx:xx:xx



hostapd-ph1.conf:

driver=nl80211
logger_syslog=127
logger_syslog_level=2
logger_stdout=127
logger_stdout_level=2
country_code=DE
ieee80211d=1
ieee80211h=1
hw_mode=a
beacon_int=100
dtim_period=2
channel=36

noscan=1

ieee80211n=1
ht_coex=0
ht_capab=[HT40+][LDPC][SHORT-GI-20][SHORT-GI-40][TX-STBC][RX-STBC1][DSSS_CCK-40]

radio_config_id=21396da8e00a736603c54dff9138828b
interface=nw1-1
ctrl_interface=/var/run/hostapd
ap_isolate=1
bss_load_update_period=60
chan_util_avg_period=600
disassoc_low_ack=1
preamble=1
wmm_enabled=1
ignore_broadcast_ssid=0
uapsd_advertisement_enabled=1
utf8_ssid=1
multi_ap=0
wpa_passphrase=xxxxxxxx
auth_algs=1
wpa=2
wpa_pairwise=CCMP
ssid=mpsk test
bridge=br-n_1
wpa_disable_eapol_key_retries=0
wpa_key_mgmt=WPA-PSK
okc=0
disable_pmksa_caching=1
config_id=111530b7ee9c5b9024ba3bd80980e101
bssid=xx:xx:xx:xx:xx:xx


bss=w1-47f
ctrl_interface=/var/run/hostapd
ap_isolate=1
bss_load_update_period=60
chan_util_avg_period=600
disassoc_low_ack=1
preamble=1
wmm_enabled=1
ignore_broadcast_ssid=0
uapsd_advertisement_enabled=1
utf8_ssid=1
multi_ap=0
auth_algs=1
wpa=0
ssid=prod open
bridge=br-n_734
config_id=0ac707c8583cb415426777e8cad64e88
bssid=xx:xx:xx:xx:xx:xx


bss=w1-8ed
ctrl_interface=/var/run/hostapd
ap_isolate=1
bss_load_update_period=60
chan_util_avg_period=600
disassoc_low_ack=1
preamble=1
wmm_enabled=1
ignore_broadcast_ssid=0
uapsd_advertisement_enabled=1
utf8_ssid=1
multi_ap=0
wpa_passphrase=xxxxxxxxxxxx
auth_algs=1
wpa=2
wpa_pairwise=CCMP
ssid=private
bridge=br-n_1
wpa_disable_eapol_key_retries=0
wpa_key_mgmt=WPA-PSK
okc=0
disable_pmksa_caching=1
config_id=883933ec3e12f654b0c0c0ee200ecf47
bssid=xx:xx:xx:xx:xx:xx


bss=w1-98a
ctrl_interface=/var/run/hostapd
ap_isolate=1
bss_load_update_period=60
chan_util_avg_period=600
disassoc_low_ack=1
preamble=1
wmm_enabled=1
ignore_broadcast_ssid=0
uapsd_advertisement_enabled=1
utf8_ssid=1
multi_ap=0
wpa_passphrase=xxxxxxxxxxxx
auth_algs=1
wpa=2
wpa_pairwise=CCMP
ssid=Wehlan
bridge=br-n_734
wpa_disable_eapol_key_retries=0
wpa_key_mgmt=WPA-PSK
okc=0
disable_pmksa_caching=1
config_id=41e596dcb0ac98d3e65e52aa21019f51
bssid=xx:xx:xx:xx:xx:xx


bss=w1-9
ctrl_interface=/var/run/hostapd
ap_isolate=1
bss_load_update_period=60
chan_util_avg_period=600
disassoc_low_ack=1
preamble=1
wmm_enabled=1
ignore_broadcast_ssid=0
uapsd_advertisement_enabled=1
utf8_ssid=1
multi_ap=0
wpa_passphrase=xxxxxxxxxxx
auth_algs=1
wpa=2
wpa_pairwise=CCMP
ssid=schedule
bridge=br-n_1
wpa_disable_eapol_key_retries=0
wpa_key_mgmt=WPA-PSK
okc=0
disable_pmksa_caching=1
config_id=7797cdc22e5d00620c86cda232f130ab
bssid=xx:xx:xx:xx:xx:xx



I'm getting a similar issue ( IPQ806x with WLE1216V2 and WLE1216V5 - QCA9984 based WLAN cards )

strange thing is sometimes it works.. ( see on the 3rd radio where it also has 3 different bssids and that worked OK on this reboot )

other times I get this error, and in both cases there are several BSSes in the config file..
I can see the radios broadcast the Wireless signals but HostAPD seems to be "down" for those interfaces.

Mon Feb 22 09:46:10 2021 daemon.notice netifd: radio0 (11297): command failed: Resource busy (-16)
Mon Feb 22 09:46:10 2021 daemon.notice netifd: radio0 (11297): RTNETLINK answers: Resource busy
Mon Feb 22 09:46:12 2021 daemon.notice hostapd: Configuration file: /var/run/hostapd-phy0.conf (phy wlan0-1)
Mon Feb 22 09:46:12 2021 daemon.err hostapd: Multiple BSSes specified in BSS-config
Mon Feb 22 09:46:12 2021 daemon.notice netifd: radio0 (11297): Command failed: Invalid argument
Mon Feb 22 09:46:12 2021 daemon.notice netifd: radio0 (11297): Device setup failed: HOSTAPD_START_FAILED
Mon Feb 22 09:46:12 2021 daemon.notice netifd: radio0 (11470): WARNING: Variable 'data' does not exist or is not an array/object

OPenWRT master ( OpenWrt SNAPSHOT r15731-dba76a85de , Kernel 5.4.96 )
wpad-mesh-openssl 2020-06-08-5a8b3662-30
ath10k-ct
ath10k-board-qca9984 20201118-3
ath10k-firmware-qca9984-ct-htt 2020-11-08-1

on each radio I'm running a
802.11s Mesh ( with SAE )
and open AP
a WPA2-PSK encrypted AP

mmm,

seems This patch might be the reason for the
RTNETLINK answers: Resource busy line..
When I edit my /lib/netifd/netifd-wireless.sh file ( on line 176 ) from
[ -n "$4" ] && json_add_boolean keep 1
to
[ -n "$4" ] && json_add_boolean keep 0

I get reliable restarts of the WLAN card and the networks come up as expected..

( I have a script that detects WAN failure and re configures the system for a different network mode, so the WLAN gets reconfigured and reload_config is called )

@DDK interesting. in a "tested this a few times" kind-of-test i can confirm that the messages go away.
not sure what it breaks, though

1 Like

I can reproduce this issue

  1. create 2 or more ssid on each phy
  2. run /etc/init.d/network restart
  3. run /etc/init.d/network restart again
  4. run /etc/init.d/network restart again
  5. run /etc/init.d/network restart again
  6. the issue happens
1 Like

I also encountered this on a hAP AC2 (OpenWrt SNAPSHOT r16640-b607e7df34) with two SSIDs on each radio.

config wifi-device 'radio0'
	option type 'mac80211'
	option hwmode '11g'
	option path 'platform/soc/a000000.wifi'
	option htmode 'HT20'
	option cell_density '0'
	option country 'CA'
	option noscan '1'
	option channel '1'
	option txpower '28'
	option disabled '0'

config wifi-iface 'default_radio0'
	option device 'radio0'
	option network 'lan'
	option mode 'ap'
	option ssid 'AAAA'
	option encryption 'sae-mixed'
	option key '***'
	option ieee80211w '1'

config wifi-device 'radio1'
	option type 'mac80211'
	option hwmode '11a'
	option path 'platform/soc/a800000.wifi'
	option htmode 'VHT80'
	option cell_density '0'
	option country 'CA'
	option noscan '1'
	option channel '157'
	option disabled '0'

config wifi-iface 'default_radio1'
	option device 'radio1'
	option network 'lan'
	option mode 'ap'
	option ssid 'AAA'
	option encryption 'sae-mixed'
	option key '***'
	option ieee80211w '1'

config wifi-iface 'wifinet2'
	option device 'radio0'
	option mode 'ap'
	option ssid 'BBBB'
	option encryption 'sae-mixed'
	option key '***'
	option ieee80211w '1'
	option network 'lan1'

config wifi-iface 'wifinet3'
	option device 'radio1'
	option mode 'ap'
	option ssid 'BBBB'
	option encryption 'sae-mixed'
	option key '***'
	option ieee80211w '1'
	option network 'lan1'

I've applied the change suggested by @DDK, and I'll see what happens.

Based on https://github.com/masap/hostap/blob/de4d62dbcd58daa791b5b281d279b269d5ceae82/src/ap/hostapd.c#L2554, I'd suspect this has something to do with updating the config for the kept process, since unlike a fresh start, hostapd can only add(?) one BSS at a time to an existing instance.

I'm going to look into what controls the fourth argument used to determine whether keep is set when I have time later this week.

2 Likes

I've experienced this problem too (hostapd: Multiple BSSes specified in BSS-config) on my TP-Link Archer C7v2 after running

/etc/init.d/network restart

@pgaskin Thanks for looking into it.

Running multiple SSIDs on the same radio here (radio0) and using OpenWrt 21.02.0-rc2