From: Denis Kenzior Date: Wed, 28 Aug 2019 21:11:10 +0000 (-0500) Subject: cfg80211: Purge frame registrations on iftype change X-Git-Tag: Ubuntu-5.13.0-19.19~7681^2~39^2 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=c1d3ad84eae35414b6b334790048406bd6301b12;p=mirror_ubuntu-jammy-kernel.git cfg80211: Purge frame registrations on iftype change Currently frame registrations are not purged, even when changing the interface type. This can lead to potentially weird situations where frames possibly not allowed on a given interface type remain registered due to the type switching happening after registration. The kernel currently relies on userspace apps to actually purge the registrations themselves, this is not something that the kernel should rely on. Add a call to cfg80211_mlme_purge_registrations() to forcefully remove any registrations left over prior to switching the iftype. Cc: stable@vger.kernel.org Signed-off-by: Denis Kenzior Link: https://lore.kernel.org/r/20190828211110.15005-1-denkenz@gmail.com Signed-off-by: Johannes Berg --- diff --git a/net/wireless/util.c b/net/wireless/util.c index 006f3eac00f7..633f6a331040 100644 --- a/net/wireless/util.c +++ b/net/wireless/util.c @@ -964,6 +964,7 @@ int cfg80211_change_iface(struct cfg80211_registered_device *rdev, } cfg80211_process_rdev_events(rdev); + cfg80211_mlme_purge_registrations(dev->ieee80211_ptr); } err = rdev_change_virtual_intf(rdev, dev, ntype, params);