From: Jouni Malinen Date: Wed, 6 Nov 2013 11:51:26 +0000 (+0200) Subject: hostapd: Do not start secondary BSS unless interface is enabled X-Git-Tag: hostap_2_1~607 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5e1a4565f8e6c4add9ade52d53bb9af2ade6f1ee;p=thirdparty%2Fhostap.git hostapd: Do not start secondary BSS unless interface is enabled It is possible for additional BSSs to be added while the primary interface is still in the process of determining channel parameters (HT co-ex scan, ACS, DFS). Do not enable secondary interfaces in such state immediately, but instead, wait for the pending operation on the primary interface to complete. Once that's done, the added extra BSSs will also be enabled in hostapd_setup_interface_complete(). Signed-hostap: Jouni Malinen --- diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c index 9306f50e5..60224ccbf 100644 --- a/src/ap/hostapd.c +++ b/src/ap/hostapd.c @@ -1768,7 +1768,8 @@ int hostapd_add_iface(struct hapd_interfaces *interfaces, char *buf) ETH_ALEN); if (start_ctrl_iface_bss(hapd) < 0 || - hostapd_setup_bss(hapd, -1)) { + (hapd_iface->state == HAPD_IFACE_ENABLED && + hostapd_setup_bss(hapd, -1))) { hapd_iface->conf->num_bss--; hapd_iface->num_bss--; wpa_printf(MSG_DEBUG, "%s: free hapd %p %s",