提交 b49bb574 编写于 作者: J Johannes Berg 提交者: John W. Linville

mac80211: fix endian error

I forgot to convert the radiotap length to
CPU endian, which sparse found thankfully.
Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
Cc: stable@kernel.org
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 d7907448
......@@ -675,10 +675,10 @@ static u16 ieee80211_monitor_select_queue(struct net_device *dev,
return 0;
if (skb->len < 4 ||
skb->len < rtap->it_len + 2 /* frame control */)
skb->len < le16_to_cpu(rtap->it_len) + 2 /* frame control */)
return 0; /* doesn't matter, frame will be dropped */
hdr = (void *)((u8 *)skb->data + rtap->it_len);
hdr = (void *)((u8 *)skb->data + le16_to_cpu(rtap->it_len));
if (!ieee80211_is_data(hdr->frame_control)) {
skb->priority = 7;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册