summaryrefslogtreecommitdiff
path: root/sys/net80211
diff options
context:
space:
mode:
authorjoshua stein <jcs@cvs.openbsd.org>2010-02-06 15:16:28 +0000
committerjoshua stein <jcs@cvs.openbsd.org>2010-02-06 15:16:28 +0000
commit5ec9c21d7c0e029bdc9820214216686bdd082040 (patch)
treee95ea9f020f5ecf1c4ac7bf32d8a824a19bd3711 /sys/net80211
parenta47d286e3c04303428422d3cea1aa50240401c2d (diff)
when receiving the first message of an rsn group key handshake
packet, copy the key out of it properly. fixes the problem where only broadcast packets like ipv6 router advertisements were failing decryption and processing, only after a rekey. ok damien@
Diffstat (limited to 'sys/net80211')
-rw-r--r--sys/net80211/ieee80211_pae_input.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/net80211/ieee80211_pae_input.c b/sys/net80211/ieee80211_pae_input.c
index a84639a60f5..9d97d72bbfb 100644
--- a/sys/net80211/ieee80211_pae_input.c
+++ b/sys/net80211/ieee80211_pae_input.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ieee80211_pae_input.c,v 1.16 2009/11/23 16:54:38 damien Exp $ */
+/* $OpenBSD: ieee80211_pae_input.c,v 1.17 2010/02/06 15:16:27 jcs Exp $ */
/*-
* Copyright (c) 2007,2008 Damien Bergamini <damien.bergamini@free.fr>
@@ -813,6 +813,7 @@ ieee80211_recv_rsn_group_msg1(struct ieee80211com *ic,
k->k_flags |= IEEE80211_KEY_TX;
k->k_rsc[0] = LE_READ_6(key->rsc);
k->k_len = keylen;
+ memcpy(k->k_key, &gtk[8], k->k_len);
/* install the GTK */
if ((*ic->ic_set_key)(ic, ni, k) != 0) {
reason = IEEE80211_REASON_AUTH_LEAVE;