@@ -1,5 +1,4 @@
/*
- * Copyright 2002-2004, Instant802 Networks, Inc.
* Copyright 2008, Jouni Malinen <j@w1.fi>
*
* This program is free software; you can redistribute it and/or modify
@@ -502,29 +501,48 @@
if (!ieee80211_is_data(hdr->frame_control) &&
!ieee80211_is_robust_mgmt_frame(skb))
+ {printk(KERN_DEBUG "DDD - 1");
return RX_CONTINUE;
+ }
data_len = skb->len - hdrlen - IEEE80211_CCMP_HDR_LEN - mic_len;
if (!rx->sta || data_len < 0)
+ {printk(KERN_DEBUG "DDD - 2");
return RX_DROP_UNUSABLE;
+ }
if (status->flag & RX_FLAG_DECRYPTED) {
if (!pskb_may_pull(rx->skb, hdrlen + IEEE80211_CCMP_HDR_LEN))
+ {printk(KERN_DEBUG "DDD - 3");
return RX_DROP_UNUSABLE;
+ }
} else {
if (skb_linearize(rx->skb))
+ {printk(KERN_DEBUG "DDD - 4");
return RX_DROP_UNUSABLE;
+ }
}
ccmp_hdr2pn(pn, skb->data + hdrlen);
queue = rx->security_idx;
+/*
+ temp = ieee80211_rx_h_michael_mic_verify(rx);
+ printk(KERN_DEBUG "DDD - 5 queue:%i Mutex=%i MIC=%i",queue, rx->local->key_mtx.count, temp);
+
+ if(temp == RX_DROP_UNUSABLE) {
+ printk(KERN_DEBUG "DDD - MIC verify failed");
+ return RX_DROP_UNUSABLE;
+ }
+ print_hex_dump_debug("cnt: ", DUMP_PREFIX_OFFSET, IEEE80211_CCMP_PN_LEN, 1, key->u.ccmp.rx_pn[queue], IEEE80211_CCMP_PN_LEN, false);
+ print_hex_dump_debug("pn : ", DUMP_PREFIX_OFFSET, IEEE80211_CCMP_PN_LEN, 1, pn, IEEE80211_CCMP_PN_LEN, false);
if (memcmp(pn, key->u.ccmp.rx_pn[queue], IEEE80211_CCMP_PN_LEN) <= 0) {
key->u.ccmp.replays++;
+ //print_hex_dump_debug("skb->data: ", DUMP_PREFIX_OFFSET, 16, 1, skb->data, skb->len, true);
return RX_DROP_UNUSABLE;
}
-
+*/
if (!(status->flag & RX_FLAG_DECRYPTED)) {
u8 aad[2 * AES_BLOCK_SIZE];
u8 b_0[AES_BLOCK_SIZE];
@@ -536,17 +554,21 @@
skb->data + hdrlen + IEEE80211_CCMP_HDR_LEN,
data_len,
skb->data + skb->len - mic_len, mic_len))
+ {printk(KERN_DEBUG "DDD - 6");
return RX_DROP_UNUSABLE;
+ }
}
memcpy(key->u.ccmp.rx_pn[queue], pn, IEEE80211_CCMP_PN_LEN);
/* Remove CCMP header and MIC */
if (pskb_trim(skb, skb->len - mic_len))
+ {printk(KERN_DEBUG "DDD - 7");
return RX_DROP_UNUSABLE;
+ }
memmove(skb->data + IEEE80211_CCMP_HDR_LEN, skb->data, hdrlen);
skb_pull(skb, IEEE80211_CCMP_HDR_LEN);
-
+ printk(KERN_DEBUG "DDD - 8");
return RX_CONTINUE;
}