|
@@ -471,6 +471,13 @@ int __netpoll_rx(struct sk_buff *skb)
|
|
if (skb->len < len || len < iph->ihl*4)
|
|
if (skb->len < len || len < iph->ihl*4)
|
|
goto out;
|
|
goto out;
|
|
|
|
|
|
|
|
+ /*
|
|
|
|
+ * Our transport medium may have padded the buffer out.
|
|
|
|
+ * Now We trim to the true length of the frame.
|
|
|
|
+ */
|
|
|
|
+ if (pskb_trim_rcsum(skb, len))
|
|
|
|
+ goto out;
|
|
|
|
+
|
|
if (iph->protocol != IPPROTO_UDP)
|
|
if (iph->protocol != IPPROTO_UDP)
|
|
goto out;
|
|
goto out;
|
|
|
|
|