diff options
Diffstat (limited to 'net/core/netpoll.c')
| -rw-r--r-- | net/core/netpoll.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/net/core/netpoll.c b/net/core/netpoll.c index da1019451ccb..4581ece48bb2 100644 --- a/net/core/netpoll.c +++ b/net/core/netpoll.c | |||
| @@ -471,6 +471,13 @@ int __netpoll_rx(struct sk_buff *skb) | |||
| 471 | if (skb->len < len || len < iph->ihl*4) | 471 | if (skb->len < len || len < iph->ihl*4) |
| 472 | goto out; | 472 | goto out; |
| 473 | 473 | ||
| 474 | /* | ||
| 475 | * Our transport medium may have padded the buffer out. | ||
| 476 | * Now We trim to the true length of the frame. | ||
| 477 | */ | ||
| 478 | if (pskb_trim_rcsum(skb, len)) | ||
| 479 | goto out; | ||
| 480 | |||
| 474 | if (iph->protocol != IPPROTO_UDP) | 481 | if (iph->protocol != IPPROTO_UDP) |
| 475 | goto out; | 482 | goto out; |
| 476 | 483 | ||
