Search Linux Wireless

802.11w bip_aad() bug ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Gentlemen,

In kernel/net/mac80211/wpa.c function bip_add is as below (in the end).

I think the aad[1] should be 
aad[1] = skb->data[1] & ~(BIT(3) | BIT(4) | BIT(5));


Reference 1: ieee802.11-2012 page 1212
"FC-MPDU Frame Control field, with:
1) Retry bit (bit 11) masked to 0
2) Power Management bit (bit 12) masked to 0
3) More Data bit (bit 13) masked to 0"

Reference 2: ieee80211-2012, page 404, Figure 8-12

The bit 11 should be bit 3 of second byte.
The bit 12 should be bit 4 of second byte.
The bit 13 should be bit 5 of second byte.


What did I miss??



-------------------------------------
static void bip_aad(struct sk_buff *skb, u8 *aad)
{
    /* BIP AAD: FC(masked) || A1 || A2 || A3 */

    /* FC type/subtype */
    aad[0] = skb->data[0];
    /* Mask FC Retry, PwrMgt, MoreData flags to zero */
    aad[1] = skb->data[1] & ~(BIT(4) | BIT(5) | BIT(6));
    /* A1 || A2 || A3 */
    memcpy(aad + 2, skb->data + 4, 3 * ETH_ALEN);
}
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux