l2tp: test for ethernet header in l2tp_eth_dev_recv()
[linux-2.6.git] / net / l2tp / l2tp_eth.c
index 58c6c4c..1ae6976 100644 (file)
@@ -132,7 +132,7 @@ static void l2tp_eth_dev_recv(struct l2tp_session *session, struct sk_buff *skb,
                printk("\n");
        }
 
-       if (data_len < ETH_HLEN)
+       if (!pskb_may_pull(skb, sizeof(ETH_HLEN)))
                goto error;
 
        secpath_reset(skb);