From: Jouni Malinen Date: Sun, 14 Apr 2019 09:33:37 +0000 (+0300) Subject: nl80211: Clear bss->freq on station mode disconnection X-Git-Tag: hostap_2_8~74 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=091c2277147eed282d828f13776b9eef371b66b8;p=thirdparty%2Fhostap.git 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 --- 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; }