]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
hostapd: Do not start secondary BSS unless interface is enabled
authorJouni Malinen <jouni@qca.qualcomm.com>
Wed, 6 Nov 2013 11:51:26 +0000 (13:51 +0200)
committerJouni Malinen <j@w1.fi>
Wed, 6 Nov 2013 13:41:05 +0000 (15:41 +0200)
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 <jouni@qca.qualcomm.com>

src/ap/hostapd.c

index 9306f50e5d04448ed0c83f718a268ced937a4f02..60224ccbfd2d16570b92f7c3691cf9dd04895040 100644 (file)
@@ -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",