Search Linux Wireless

[PATCH] cfg80211: Skip key deletion for open associations

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Chaitanya Tata <chaitanya.mgit@xxxxxxxxx>

From: Chaitanya Tata <chaitanya.mgit@xxxxxxxxx>

If the association is open (no authentication and encryption) no need
to delete the keys, though this is handled by all drivers, this is
unnecessary.

Signed-off-by: Chaitanya Tata <chaitanya.tata@xxxxxxxxxxxxxxx>
---
 net/wireless/sme.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/net/wireless/sme.c b/net/wireless/sme.c
index 38df713f2e2e..3850af772131 100644
--- a/net/wireless/sme.c
+++ b/net/wireless/sme.c
@@ -1099,7 +1099,6 @@ void __cfg80211_disconnected(struct net_device *dev, const u8 *ie,
 	wdev->ssid_len = 0;
 	wdev->conn_owner_nlportid = 0;
 	kfree_sensitive(wdev->connect_keys);
-	wdev->connect_keys = NULL;
 
 	nl80211_send_disconnected(rdev, dev, reason, ie, ie_len, from_ap);
 
@@ -1113,7 +1112,7 @@ void __cfg80211_disconnected(struct net_device *dev, const u8 *ie,
 	 * Delete all the keys ... pairwise keys can't really
 	 * exist any more anyway, but default keys might.
 	 */
-	if (rdev->ops->del_key) {
+	if (wdev->connect_keys && rdev->ops->del_key) {
 		int max_key_idx = 5;
 
 		if (wiphy_ext_feature_isset(
@@ -1127,6 +1126,8 @@ void __cfg80211_disconnected(struct net_device *dev, const u8 *ie,
 			rdev_del_key(rdev, dev, i, false, NULL);
 	}
 
+	wdev->connect_keys = NULL;
+
 	rdev_set_qos_map(rdev, dev, NULL);
 
 #ifdef CONFIG_CFG80211_WEXT
-- 
2.17.1




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux