summaryrefslogtreecommitdiffstats
path: root/net/mac80211
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2014-12-17 13:55:49 +0100
committerLuis Henriques <luis.henriques@canonical.com>2015-01-15 10:44:09 +0000
commit8a0de58884a7823cf69534eee4e514c706baf3fb (patch)
tree0944043cb190e7c1e33bf9a2f12f7f2116113d06 /net/mac80211
parent56221fafe328a503579a49b5157543f7eaa2204a (diff)
downloadlinux-stable-8a0de58884a7823cf69534eee4e514c706baf3fb.tar.gz
linux-stable-8a0de58884a7823cf69534eee4e514c706baf3fb.tar.bz2
linux-stable-8a0de58884a7823cf69534eee4e514c706baf3fb.zip
mac80211: free management frame keys when removing station
commit 28a9bc68124c319b2b3dc861e80828a8865fd1ba upstream. When writing the code to allow per-station GTKs, I neglected to take into account the management frame keys (index 4 and 5) when freeing the station and only added code to free the first four data frame keys. Fix this by iterating the array of keys over the right length. Fixes: e31b82136d1a ("cfg80211/mac80211: allow per-station GTKs") Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/key.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/mac80211/key.c b/net/mac80211/key.c
index 16d97f044a20..947daa9d3346 100644
--- a/net/mac80211/key.c
+++ b/net/mac80211/key.c
@@ -653,7 +653,7 @@ void ieee80211_free_sta_keys(struct ieee80211_local *local,
int i;
mutex_lock(&local->key_mtx);
- for (i = 0; i < NUM_DEFAULT_KEYS; i++) {
+ for (i = 0; i < ARRAY_SIZE(sta->gtk); i++) {
key = key_mtx_dereference(local, sta->gtk[i]);
if (!key)
continue;