Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 28a9bc6

Browse files
committed
mac80211: free management frame keys when removing station
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. Cc: [email protected] Fixes: e31b821 ("cfg80211/mac80211: allow per-station GTKs") Signed-off-by: Johannes Berg <[email protected]>
1 parent 185076d commit 28a9bc6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/mac80211/key.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -656,7 +656,7 @@ void ieee80211_free_sta_keys(struct ieee80211_local *local,
656656
int i;
657657

658658
mutex_lock(&local->key_mtx);
659-
for (i = 0; i < NUM_DEFAULT_KEYS; i++) {
659+
for (i = 0; i < ARRAY_SIZE(sta->gtk); i++) {
660660
key = key_mtx_dereference(local, sta->gtk[i]);
661661
if (!key)
662662
continue;

0 commit comments

Comments
 (0)