]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Drop local stations on broadcast deauth/disassoc request
authorJouni Malinen <jouni.malinen@atheros.com>
Wed, 10 Nov 2010 15:09:31 +0000 (17:09 +0200)
committerJouni Malinen <j@w1.fi>
Wed, 10 Nov 2010 15:09:31 +0000 (17:09 +0200)
When hostapd_cli deauth/disassoc is used with ff:ff:ff:ff:ff:ff
address, drop all local STA entries in addition to sending out the
broadcast deauth/disassoc frame.

hostapd/ctrl_iface.c

index 84a1b7e765d8552903394e5aab2405befce83f61..152134c609099a77f3bc403004164a2fe953fe17 100644 (file)
@@ -260,6 +260,8 @@ static int hostapd_ctrl_iface_deauthenticate(struct hostapd_data *hapd,
        if (sta)
                ap_sta_deauthenticate(hapd, sta,
                                      WLAN_REASON_PREV_AUTH_NOT_VALID);
+       else if (addr[0] == 0xff)
+               hostapd_free_stas(hapd);
 
        return 0;
 }
@@ -314,6 +316,8 @@ static int hostapd_ctrl_iface_disassociate(struct hostapd_data *hapd,
        if (sta)
                ap_sta_disassociate(hapd, sta,
                                    WLAN_REASON_PREV_AUTH_NOT_VALID);
+       else if (addr[0] == 0xff)
+               hostapd_free_stas(hapd);
 
        return 0;
 }