From: Gertjan van Wingerde <gwingerde@gmail.com>
To: Benoit PAPILLAULT <benoit.papillault@free.fr>
Cc: rt2x00 Users List <users@rt2x00.serialmonkey.com>,
linux-wireless@vger.kernel.org
Subject: Re: [rt2x00-users] [PATCH v2] rt2x00: Further L2 padding fixes.
Date: Sun, 29 Nov 2009 18:42:10 +0100 [thread overview]
Message-ID: <4B12B272.9090607@gmail.com> (raw)
In-Reply-To: <4B12ADA1.6010401@free.fr>
On 11/29/09 18:21, Benoit PAPILLAULT wrote:
> Gertjan van Wingerde a écrit :
>>> 2. If we receive a QoS DATA frame whose header_length is 26 according to
>>> frame_control, but skb->len = 20, then ieee80211_get_hdrlen_from_skb()
>>> will returns hdrlen = 0 based on the value of skb->len. However, this
>>> function does not know if skb->len includes said padding or not, or some
>>> other padding! (On RX, rt2870 usb frames are also padded at the end!).
>>
>> But, in that case we have received an invalid frame anyway, so the padding
>> doesn't really matter.
>
> I fully disagree here. It's a bit of chicken-egg problem. I'm using
> monitor mode to debug other wireless drivers, so I need a tool that
> gives me the frame as it appears on the radio medium, be it invalid or
> not. And I do see lots of invalid 802.11 frames in real life that are
> generated by bogus drivers or intended to be bogus in order to crash
> wireless drivers.
So, what do you suggest we do here?
If we don't know what kind of data is given (clearly even the ieee80211 header
is malformed), then how can we detect what padding has been added by the hardware.
We know that the hardware puts padding between the header and the payload, but in
this case we don't even have a full header.
The only sane thing to do here is to assume that no padding has been applied at all.
Also, do we know how mac80211 reacts to these kinds of frames, so is it safe to
pass it to mac80211?
---
Gertjan.
next prev parent reply other threads:[~2009-11-29 17:42 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-29 11:47 [PATCH v2] rt2x00: Further L2 padding fixes Gertjan van Wingerde
2009-11-29 13:27 ` Ivo Van Doorn
2009-11-29 14:32 ` [rt2x00-users] " Benoit PAPILLAULT
2009-11-29 14:59 ` Gertjan van Wingerde
2009-11-29 17:21 ` Benoit PAPILLAULT
2009-11-29 17:42 ` Gertjan van Wingerde [this message]
2009-11-29 17:55 ` Benoit PAPILLAULT
2009-11-29 20:38 ` Gertjan van Wingerde
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4B12B272.9090607@gmail.com \
--to=gwingerde@gmail.com \
--cc=benoit.papillault@free.fr \
--cc=linux-wireless@vger.kernel.org \
--cc=users@rt2x00.serialmonkey.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).