summaryrefslogtreecommitdiffstats
path: root/sys/net80211/ieee80211_node.c
diff options
context:
space:
mode:
authorsam <sam@FreeBSD.org>2008-12-15 22:50:50 +0000
committersam <sam@FreeBSD.org>2008-12-15 22:50:50 +0000
commit15140ba61820c3348efb6d58ce4d68bcc17d1dda (patch)
tree290c433bde52e6f0e5f168b311e027f365662f75 /sys/net80211/ieee80211_node.c
parentbd66e2635ffb8e817258fc64b73afaed00771450 (diff)
downloadFreeBSD-src-15140ba61820c3348efb6d58ce4d68bcc17d1dda.zip
FreeBSD-src-15140ba61820c3348efb6d58ce4d68bcc17d1dda.tar.gz
Fix ucastkey teardown for drivers that plumb clear keys or similar
(e.g. ath): we must check the key index and not whether the key points at a cipher other than "undef". This looks like it's been broken for a while. Might be worth adding an explicit clear cipher at some point though this would require changes to the usage of IEEE80211_KEY_UNDEFINED. PR: 125906
Diffstat (limited to 'sys/net80211/ieee80211_node.c')
-rw-r--r--sys/net80211/ieee80211_node.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/net80211/ieee80211_node.c b/sys/net80211/ieee80211_node.c
index 1d1e5d7..0b6d1b9 100644
--- a/sys/net80211/ieee80211_node.c
+++ b/sys/net80211/ieee80211_node.c
@@ -1643,7 +1643,7 @@ ieee80211_node_delucastkey(struct ieee80211_node *ni)
IEEE80211_NODE_LOCK(nt);
nikey = NULL;
status = 1; /* NB: success */
- if (!IEEE80211_KEY_UNDEFINED(&ni->ni_ucastkey)) {
+ if (ni->ni_ucastkey.wk_keyix != IEEE80211_KEYIX_NONE) {
keyix = ni->ni_ucastkey.wk_rxkeyix;
status = ieee80211_crypto_delkey(ni->ni_vap, &ni->ni_ucastkey);
if (nt->nt_keyixmap != NULL && keyix < nt->nt_keyixmax) {
OpenPOWER on IntegriCloud