svn commit: r186144 - head/sys/net80211

Sam Leffler sam at FreeBSD.org
Mon Dec 15 22:50:50 UTC 2008


Author: sam
Date: Mon Dec 15 22:50:50 2008
New Revision: 186144
URL: http://svn.freebsd.org/changeset/base/186144

Log:
  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

Modified:
  head/sys/net80211/ieee80211_node.c

Modified: head/sys/net80211/ieee80211_node.c
==============================================================================
--- head/sys/net80211/ieee80211_node.c	Mon Dec 15 22:31:54 2008	(r186143)
+++ head/sys/net80211/ieee80211_node.c	Mon Dec 15 22:50:50 2008	(r186144)
@@ -1643,7 +1643,7 @@ ieee80211_node_delucastkey(struct ieee80
 		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) {


More information about the svn-src-all mailing list