* 802.11w bip_aad() bug ?
@ 2012-10-01 15:13 Chaoxing Lin
2012-10-01 19:20 ` Johannes Berg
0 siblings, 1 reply; 2+ messages in thread
From: Chaoxing Lin @ 2012-10-01 15:13 UTC (permalink / raw)
To: linux-wireless@vger.kernel.org
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);
}
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: 802.11w bip_aad() bug ?
2012-10-01 15:13 802.11w bip_aad() bug ? Chaoxing Lin
@ 2012-10-01 19:20 ` Johannes Berg
0 siblings, 0 replies; 2+ messages in thread
From: Johannes Berg @ 2012-10-01 19:20 UTC (permalink / raw)
To: Chaoxing Lin; +Cc: linux-wireless@vger.kernel.org
On Mon, 2012-10-01 at 15:13 +0000, Chaoxing Lin wrote:
> 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??
Nothing, we just fixed that:
http://git.kernel.org/?p=linux/kernel/git/jberg/mac80211.git;a=commitdiff;h=33766368f6532313571534f9112b1796d6651bbe
(note that the URL might not be accessible yet, I pieced it together and
had evidently forgotten to push out this change before, so you may have
to wait for git.kernel.org to sync with the master)
johannes
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-10-01 19:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-01 15:13 802.11w bip_aad() bug ? Chaoxing Lin
2012-10-01 19:20 ` Johannes Berg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).