aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2016-06-18 12:50:14 (GMT)
committerJouni Malinen <j@w1.fi>2016-06-19 17:18:09 (GMT)
commit4367eec4394002046e1ad99b2ecf878d925415f0 (patch)
tree9c8814dba2fdcb1bc0e7f6ba4374642bd4fb1a02 /wpa_supplicant
parenta4eec3c2305856bfb228daac6b047f6baf80c12e (diff)
downloadhostap-4367eec4394002046e1ad99b2ecf878d925415f0.zip
hostap-4367eec4394002046e1ad99b2ecf878d925415f0.tar.gz
hostap-4367eec4394002046e1ad99b2ecf878d925415f0.tar.bz2
mesh: Do not use RX MGTK as RX IGTK
The previous implementation was incorrect in forcing the MGTK to be used as the IGTK as well. Define new variable for storing IGTK and use that, if set, to configure IGTK to the driver. This commit does not yet fix AMPE element parsing to fill in this information. Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'wpa_supplicant')
-rw-r--r--wpa_supplicant/mesh_mpm.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/wpa_supplicant/mesh_mpm.c b/wpa_supplicant/mesh_mpm.c
index 090198d..9829bcc 100644
--- a/wpa_supplicant/mesh_mpm.c
+++ b/wpa_supplicant/mesh_mpm.c
@@ -805,9 +805,15 @@ static void mesh_mpm_plink_estab(struct wpa_supplicant *wpa_s,
wpa_drv_set_key(wpa_s, WPA_ALG_CCMP, sta->addr, 1, 0,
seq, sizeof(seq),
sta->mgtk, sta->mgtk_len);
- wpa_drv_set_key(wpa_s, WPA_ALG_IGTK, sta->addr, 4, 0,
- seq, sizeof(seq),
- sta->mgtk, sizeof(sta->mgtk));
+
+ if (sta->igtk_len) {
+ wpa_hexdump_key(MSG_DEBUG, "RX IGTK",
+ sta->igtk, sta->igtk_len);
+ /* FIX: key index.. */
+ wpa_drv_set_key(wpa_s, WPA_ALG_IGTK, sta->addr, 4, 0,
+ seq, sizeof(seq),
+ sta->igtk, sta->igtk_len);
+ }
}
wpa_mesh_set_plink_state(wpa_s, sta, PLINK_ESTAB);