Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 263550
b: refs/heads/master
c: e9278a4
h: refs/heads/master
v: v3
  • Loading branch information
Eric Dumazet authored and David S. Miller committed Aug 26, 2011
1 parent 2f794e2 commit 966975a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3d015565f316584139946a1c450d44209beefeb6
refs/heads/master: e9278a475f845833b569ca47171e64fe48c616e0
4 changes: 3 additions & 1 deletion trunk/net/core/netpoll.c
Original file line number Diff line number Diff line change
Expand Up @@ -558,13 +558,14 @@ int __netpoll_rx(struct sk_buff *skb)
if (skb_shared(skb))
goto out;

iph = (struct iphdr *)skb->data;
if (!pskb_may_pull(skb, sizeof(struct iphdr)))
goto out;
iph = (struct iphdr *)skb->data;
if (iph->ihl < 5 || iph->version != 4)
goto out;
if (!pskb_may_pull(skb, iph->ihl*4))
goto out;
iph = (struct iphdr *)skb->data;
if (ip_fast_csum((u8 *)iph, iph->ihl) != 0)
goto out;

Expand All @@ -579,6 +580,7 @@ int __netpoll_rx(struct sk_buff *skb)
if (pskb_trim_rcsum(skb, len))
goto out;

iph = (struct iphdr *)skb->data;
if (iph->protocol != IPPROTO_UDP)
goto out;

Expand Down

0 comments on commit 966975a

Please sign in to comment.