]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Remove all BSSs on removal of the first one
authorJouni Malinen <jouni@qca.qualcomm.com>
Tue, 5 Nov 2013 22:43:10 +0000 (00:43 +0200)
committerJouni Malinen <j@w1.fi>
Tue, 5 Nov 2013 22:43:10 +0000 (00:43 +0200)
The changes in commit 5592065850a40e235020dba79e5592b949b829b8 to allow
any BSS to be removed were a bit too early since there are still number
of areas that use the first BSS as a special case. Especially the
driver_ops API is going to require quite a bit of cleanup before removal
of the first BSS without the other BSSes of the same radio can be done
safely.

For now, force all BSSs to be removed in case the first one is removed.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>

src/ap/hostapd.c

index 52be3110db706656e30f1a1d3b2928715a0c446b..94aefe9f8864aff283203cd1afc63928af3fc7ca 100644 (file)
@@ -1854,8 +1854,7 @@ int hostapd_remove_iface(struct hapd_interfaces *interfaces, char *buf)
                hapd_iface = interfaces->iface[i];
                if (hapd_iface == NULL)
                        return -1;
-               if (hapd_iface->conf->num_bss == 1 &&
-                   !os_strcmp(hapd_iface->conf->bss[0]->iface, buf)) {
+               if (!os_strcmp(hapd_iface->conf->bss[0]->iface, buf)) {
                        wpa_printf(MSG_INFO, "Remove interface '%s'", buf);
                        hostapd_interface_deinit_free(hapd_iface);
                        k = i;