summaryrefslogtreecommitdiffstats
path: root/net/core/netpoll.c
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2011-09-01 15:57:23 +1000
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2011-09-01 15:57:32 +1000
commit7bfb40b048aa709bb88a00a1acbadbd9f7a645ee (patch)
tree88cfef3d3facca564ad378553a838789e0c78cb1 /net/core/netpoll.c
parent9bb7361d99fb5c510e62b521e4292581fa1bee98 (diff)
parent9e79e3e9dd9672b37ac9412e9a926714306551fe (diff)
Merge remote-tracking branch 'origin/master' into next
(Pickup Stephen's fix d4d7b2a11c423a8d4088bb0090e4c8d626d043bc)
Diffstat (limited to 'net/core/netpoll.c')
-rw-r--r--net/core/netpoll.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/core/netpoll.c b/net/core/netpoll.c
index adf84dd8c7b..52622517e0d 100644
--- a/net/core/netpoll.c
+++ b/net/core/netpoll.c
@@ -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;
@@ -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;