]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
wlantest: Fix Mgmt CCMP replay detection to use correct PN offset
authorJouni Malinen <j@w1.fi>
Thu, 11 Nov 2010 19:35:30 +0000 (21:35 +0200)
committerJouni Malinen <j@w1.fi>
Thu, 11 Nov 2010 19:35:30 +0000 (21:35 +0200)
wlantest/rx_mgmt.c

index 853b0a7cb4b10634b9e059855d5e68a31d5dc3f7..e00b98ae5e94f63e8efded4a985180cb114a6d92 100644 (file)
@@ -686,7 +686,7 @@ static u8 * mgmt_ccmp_decrypt(struct wlantest *wt, const u8 *data, size_t len,
        else
                rsc = sta->rsc_fromds[16];
 
-       ccmp_get_pn(pn, data);
+       ccmp_get_pn(pn, data + 24);
        if (os_memcmp(pn, rsc, 6) <= 0) {
                wpa_printf(MSG_INFO, "CCMP/TKIP replay detected: SA=" MACSTR,
                           MAC2STR(hdr->addr2));