Thread (5 messages) flat view 5 messages, 3 authors, 2012-09-20

Re: regression: tethering fails in 3.5 with iwlwifi

From: Johannes Berg <johannes@sipsolutions.net>
Date: 2012-09-20 12:51:09
Also in: linux-wireless

Possibly related (same subject, not in this thread)

On Thu, 2012-09-20 at 14:47 +0200, Johannes Berg wrote:
quoted
                if (skb) {
                        /* deliver to local stack */
-                       skb->protocol = eth_type_trans(skb, dev);
-                       memset(skb->cb, 0, sizeof(skb->cb));
-                       netif_receive_skb(skb);
+                       if (pskb_may_pull(skb, sizeof(struct ethhdr))) {
+                               skb->protocol = eth_type_trans(skb, dev);
+                               memset(skb->cb, 0, sizeof(skb->cb));
+                               netif_receive_skb(skb);
+                       } else {
+                               kfree_skb(skb);
+                       }
                }
        }
Yeah I was looking at the same code just now. However, we had actually
inserted the skb_linearize() *after* eth_type_trans(), so I'm confused.
Ok actually, by the time we get here the ethernet header must be in the
skb head because we construct it from the 802.11 and llc/snap header.

johannes
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help