Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 15 Dec 2008 22:50:50 +0000 (UTC)
From:      Sam Leffler <sam@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r186144 - head/sys/net80211
Message-ID:  <200812152250.mBFMooLG019078@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200812152250.mBFMooLG019078>