aboutsummaryrefslogtreecommitdiffstats
path: root/wlantest/rx_data.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2010-11-11 17:53:12 (GMT)
committerJouni Malinen <j@w1.fi>2010-11-11 17:53:12 (GMT)
commit07d0a5be453866085a71c8fcde4e2a4e87289780 (patch)
tree65951ce9d3c4f90f0f2664abb282cbfbdb75339d /wlantest/rx_data.c
parentbc8714283dc61b57bbc0ab1cf51c62c64e6d6fee (diff)
downloadhostap-07d0a5be453866085a71c8fcde4e2a4e87289780.zip
hostap-07d0a5be453866085a71c8fcde4e2a4e87289780.tar.gz
hostap-07d0a5be453866085a71c8fcde4e2a4e87289780.tar.bz2
wlantest: Decrypt group addressed Data frames
Diffstat (limited to 'wlantest/rx_data.c')
-rw-r--r--wlantest/rx_data.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/wlantest/rx_data.c b/wlantest/rx_data.c
index 34679ed..95d6b16 100644
--- a/wlantest/rx_data.c
+++ b/wlantest/rx_data.c
@@ -698,6 +698,8 @@ static void rx_data_bss_prot_group(struct wlantest *wt,
{
struct wlantest_bss *bss;
int keyid;
+ u8 *decrypted;
+ size_t dlen;
bss = bss_get(wt, hdr->addr2);
if (bss == NULL)
@@ -715,7 +717,13 @@ static void rx_data_bss_prot_group(struct wlantest *wt,
return;
}
- /* TODO: try to decrypt */
+ /* TODO: check PN for replay */
+ /* TODO: TKIP */
+
+ decrypted = ccmp_decrypt(bss->gtk[keyid], hdr, data, len, &dlen);
+ if (decrypted)
+ rx_data_process(wt, dst, src, decrypted, dlen, 1);
+ os_free(decrypted);
}