Search Linux Wireless

[PATCH] mac80211: silently accept deletion of non-existant key

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

 



From: John W. Linville <linville@xxxxxxxxxxxxxxxxxx>

Otherwise, 'iwconfig wlan0 key off' with no key set results in:

	Error for wireless request "Set Encode" (8B2A) :
	    SET failed on device wlan0 ; No such file or directory.

Signed-off-by: John W. Linville <linville@xxxxxxxxxxxxx>
---
Is it really worth returning an error if someone tries to delete an
non-existant key?  Does hostapd make some use of that?

Would it be worth having a debug message in the non-existant key case?

 net/mac80211/ieee80211_ioctl.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/net/mac80211/ieee80211_ioctl.c b/net/mac80211/ieee80211_ioctl.c
index 1d91575..7d6d52d 100644
--- a/net/mac80211/ieee80211_ioctl.c
+++ b/net/mac80211/ieee80211_ioctl.c
@@ -55,9 +55,6 @@ static int ieee80211_set_encryption(struct net_device *dev, u8 *sta_addr,
 			key = sta->key;
 		}
 
-		if (!key)
-			return -ENOENT;
-
 		ieee80211_key_free(key);
 		return 0;
 	} else {
-- 
1.5.4.1

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux