]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - drivers/net/ppp/pppoe.c
pppoe: fix reception of frames with no mac header
[linux.git] / drivers / net / ppp / pppoe.c
index ce61231e96ea5fe27f512fbd0d80d4609997e508..62dc564b251d5e0c2019035355aa17426471cc8e 100644 (file)
@@ -429,6 +429,9 @@ static int pppoe_rcv(struct sk_buff *skb, struct net_device *dev,
        if (!skb)
                goto out;
 
+       if (skb_mac_header_len(skb) < ETH_HLEN)
+               goto drop;
+
        if (!pskb_may_pull(skb, sizeof(struct pppoe_hdr)))
                goto drop;