diff options
author | Andrzej Zaborowski <andrew.zaborowski@intel.com> | 2017-01-07 00:33:43 +0300 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2017-01-09 15:08:47 +0300 |
commit | bd2522b168847106c1885f0319a2833bdf88bf9a (patch) | |
tree | ec3f75dc8494db6c426e7f25a86cfd13ae99e2f3 /net/wireless/mlme.c | |
parent | 4ef8c1c93f848e360754f10eb2e7134c872b6597 (diff) | |
download | linux-bd2522b168847106c1885f0319a2833bdf88bf9a.tar.xz |
cfg80211: NL80211_ATTR_SOCKET_OWNER support for CMD_CONNECT
Disconnect or deauthenticate when the owning socket is closed if this
flag is supplied to CMD_CONNECT or CMD_ASSOCIATE. This may be used
to ensure userspace daemon doesn't leave an unmanaged connection behind.
In some situations it would be possible to account for that, to some
degree, in the deamon restart code or in the up/down scripts without
the use of this attribute. But there will be systems where the daemon
can go away for varying periods without a warning due to local resource
management.
Signed-off-by: Andrew Zaborowski <andrew.zaborowski@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless/mlme.c')
-rw-r--r-- | net/wireless/mlme.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/net/wireless/mlme.c b/net/wireless/mlme.c index 4646cf5695b9..1c63a77aea34 100644 --- a/net/wireless/mlme.c +++ b/net/wireless/mlme.c @@ -345,6 +345,11 @@ int cfg80211_mlme_deauth(struct cfg80211_registered_device *rdev, !ether_addr_equal(wdev->current_bss->pub.bssid, bssid))) return 0; + if (ether_addr_equal(wdev->disconnect_bssid, bssid) || + (wdev->current_bss && + ether_addr_equal(wdev->current_bss->pub.bssid, bssid))) + wdev->conn_owner_nlportid = 0; + return rdev_deauth(rdev, dev, &req); } |