hostapd: Send an event before throwing a station on re-authentication

If you modify the WLAN-STA-AUTHORIZED bit in sta->flags, you have to
call the ap_sta_set_authorized() function to make sure the corresponding
event is sent over the control interface. Otherwise we leak entries in
the event history.

Signed-off-by: Andreas Tobler <andreas.tobler@cloudguard.ch>
This commit is contained in:
Andreas Tobler 2018-08-13 07:45:37 +02:00 committed by Jouni Malinen
parent 57151ae984
commit b5ebe5dd5b

View file

@ -2014,6 +2014,7 @@ static void handle_auth(struct hostapd_data *hapd,
* updated. To handle this, station's added_unassoc flag is
* cleared once the station has completed association.
*/
ap_sta_set_authorized(hapd, sta, 0);
hostapd_drv_sta_remove(hapd, sta->addr);
sta->flags &= ~(WLAN_STA_ASSOC | WLAN_STA_AUTH |
WLAN_STA_AUTHORIZED);