]> Git Repo - linux.git/commitdiff
cfg80211: Purge frame registrations on iftype change
authorDenis Kenzior <[email protected]>
Wed, 28 Aug 2019 21:11:10 +0000 (16:11 -0500)
committerJohannes Berg <[email protected]>
Wed, 11 Sep 2019 08:45:10 +0000 (10:45 +0200)
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: [email protected]
Signed-off-by: Denis Kenzior <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Johannes Berg <[email protected]>
net/wireless/util.c

index 006f3eac00f790f77a2fa67f75f95dc848ce1d05..633f6a3310400b06100ef175a44f3396ffedf838 100644 (file)
@@ -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);
This page took 0.064956 seconds and 4 git commands to generate.