From 091c2277147eed282d828f13776b9eef371b66b8 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sun, 14 Apr 2019 12:33:37 +0300 Subject: [PATCH] nl80211: Clear bss->freq on station mode disconnection 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 --- src/drivers/driver_nl80211.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c index 60934fbbc..7b3281fa0 100644 --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c @@ -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; }