wlantest: Decrypt group addressed Data frames

This commit is contained in:
Jouni Malinen 2010-11-11 19:53:12 +02:00
parent bc8714283d
commit 07d0a5be45

View file

@ -698,6 +698,8 @@ static void rx_data_bss_prot_group(struct wlantest *wt,
{ {
struct wlantest_bss *bss; struct wlantest_bss *bss;
int keyid; int keyid;
u8 *decrypted;
size_t dlen;
bss = bss_get(wt, hdr->addr2); bss = bss_get(wt, hdr->addr2);
if (bss == NULL) if (bss == NULL)
@ -715,7 +717,13 @@ static void rx_data_bss_prot_group(struct wlantest *wt,
return; 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);
} }