]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
nl80211: Clear bss->freq on station mode disconnection
authorJouni Malinen <j@w1.fi>
Sun, 14 Apr 2019 09:33:37 +0000 (12:33 +0300)
committerJouni Malinen <j@w1.fi>
Sun, 14 Apr 2019 09:33:37 +0000 (12:33 +0300)
This fixes some issues where bss->freq could have been used to replace
the current operating channel when sending out a management frame.
bss->freq has not been consistently used to track the current operating
channel in station mode, so it should not be trusted for this type of
uses. Clearing it makes this a bit more robust by at least avoiding the
cases of information from past association being used.

Signed-off-by: Jouni Malinen <j@w1.fi>
src/drivers/driver_nl80211.c

index 60934fbbcd0369f2e1cd8764347cef9acf8b47ae..7b3281fa007e97a08577b30bb0c18df950861650 100644 (file)
@@ -307,6 +307,7 @@ void nl80211_mark_disconnected(struct wpa_driver_nl80211_data *drv)
                os_memcpy(drv->prev_bssid, drv->bssid, ETH_ALEN);
        drv->associated = 0;
        os_memset(drv->bssid, 0, ETH_ALEN);
+       drv->first_bss->freq = 0;
 }