提交 dacb6f1d 编写于 作者: M matthieu castet 提交者: John W. Linville

mac80211 : fix unaligned rx skb

mac80211 is checking is the skb is aligned on 32 bit boundary.
But it is checking against ethernet header, whereas Linux expect IP
header aligned.  And ethernet ether size is 6*2+2=14, so aligning
ethernet header make IP header unaligned.
Signed-off-by: NMatthieu CASTET <castet.matthieu@free.fr>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 b52a033c
......@@ -1335,7 +1335,7 @@ ieee80211_deliver_skb(struct ieee80211_rx_data *rx)
* mac80211. That also explains the __skb_push()
* below.
*/
align = (unsigned long)skb->data & 3;
align = ((unsigned long)(skb->data + sizeof(struct ethhdr))) & 3;
if (align) {
if (WARN_ON(skb_headroom(skb) < 3)) {
dev_kfree_skb(skb);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册