From 07d0a5be453866085a71c8fcde4e2a4e87289780 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Thu, 11 Nov 2010 19:53:12 +0200 Subject: [PATCH] wlantest: Decrypt group addressed Data frames --- wlantest/rx_data.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/wlantest/rx_data.c b/wlantest/rx_data.c index 34679eddf..95d6b1663 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); }