From b5ebe5dd5b03f4b499b88a6ce14dc67f13a0d212 Mon Sep 17 00:00:00 2001 From: Andreas Tobler Date: Mon, 13 Aug 2018 07:45:37 +0200 Subject: [PATCH] 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 --- src/ap/ieee802_11.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c index d7e7210f7..d8b34fa52 100644 --- a/src/ap/ieee802_11.c +++ b/src/ap/ieee802_11.c @@ -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);