-/* $OpenBSD: ieee80211_crypto.c,v 1.73 2018/04/28 14:46:10 stsp Exp $ */
+/* $OpenBSD: ieee80211_crypto.c,v 1.74 2018/09/24 20:14:59 stsp Exp $ */
/*-
* Copyright (c) 2008 Damien Bergamini <damien.bergamini@free.fr>
ni->ni_rsncipher != IEEE80211_CIPHER_USEGROUP)
return &ni->ni_pairwise_key;
- if ((ic->ic_flags & IEEE80211_F_WEPON) ||
- !IEEE80211_IS_MULTICAST(wh->i_addr1) ||
- (wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK) !=
- IEEE80211_FC0_TYPE_MGT)
- kid = ic->ic_def_txkey;
- else
+ /* All other cases (including WEP) use a group key. */
+ if (ni->ni_flags & IEEE80211_NODE_MFP)
kid = ic->ic_igtk_kid;
+ else
+ kid = ic->ic_def_txkey;
+
return &ic->ic_nw_keys[kid];
}