From 50792711b6cbefd6bddaf1d78592e30d9b5056c1 Mon Sep 17 00:00:00 2001 From: sam Date: Tue, 10 Feb 2009 19:27:50 +0000 Subject: [PATCH] mark the CLR key installed for open auth stations such that it is reclaimed when net80211 tears down station state; without this we leak keycache slots --- sys/dev/ath/if_ath.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/dev/ath/if_ath.c b/sys/dev/ath/if_ath.c index dc981c4dd8c6..192521641b31 100644 --- a/sys/dev/ath/if_ath.c +++ b/sys/dev/ath/if_ath.c @@ -6093,6 +6093,8 @@ ath_setup_stationkey(struct ieee80211_node *ni) /* XXX locking? */ ni->ni_ucastkey.wk_keyix = keyix; ni->ni_ucastkey.wk_rxkeyix = rxkeyix; + /* NB: must mark device key to get called back on delete */ + ni->ni_ucastkey.wk_flags |= IEEE80211_KEY_DEVKEY; IEEE80211_ADDR_COPY(ni->ni_ucastkey.wk_macaddr, ni->ni_macaddr); /* NB: this will create a pass-thru key entry */ ath_keyset(sc, &ni->ni_ucastkey, vap->iv_bss);