aboutsummaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
authorChangli Gao <xiaosuo@gmail.com>2010-08-21 02:13:28 -0400
committerDavid S. Miller <davem@davemloft.net>2010-08-22 01:54:49 -0400
commit1003489e06c04d807c783a8958f2ccc9aed7a244 (patch)
treecf42b133731794a92e073b6ca7170d1099d0a360 /net/core
parenteb4d40654505e47aa9d2035bb97f631fa61d14b4 (diff)
net: rps: fix the wrong network header pointer
__skb_get_rxhash() was broken after the commit: commit bfb564e7391340638afe4ad67744a8f3858e7566 Author: Krishna Kumar <krkumar2@in.ibm.com> Date: Wed Aug 4 06:15:52 2010 +0000 core: Factor out flow calculation from get_rps_cpu Signed-off-by: Changli Gao <xiaosuo@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r--net/core/dev.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index da584f5ab3d2..4d74d26b8e1a 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -2283,7 +2283,7 @@ __u32 __skb_get_rxhash(struct sk_buff *skb)
2283 if (!pskb_may_pull(skb, sizeof(*ip) + nhoff)) 2283 if (!pskb_may_pull(skb, sizeof(*ip) + nhoff))
2284 goto done; 2284 goto done;
2285 2285
2286 ip = (struct iphdr *) skb->data + nhoff; 2286 ip = (struct iphdr *) (skb->data + nhoff);
2287 if (ip->frag_off & htons(IP_MF | IP_OFFSET)) 2287 if (ip->frag_off & htons(IP_MF | IP_OFFSET))
2288 ip_proto = 0; 2288 ip_proto = 0;
2289 else 2289 else
@@ -2296,7 +2296,7 @@ __u32 __skb_get_rxhash(struct sk_buff *skb)
2296 if (!pskb_may_pull(skb, sizeof(*ip6) + nhoff)) 2296 if (!pskb_may_pull(skb, sizeof(*ip6) + nhoff))
2297 goto done; 2297 goto done;
2298 2298
2299 ip6 = (struct ipv6hdr *) skb->data + nhoff; 2299 ip6 = (struct ipv6hdr *) (skb->data + nhoff);
2300 ip_proto = ip6->nexthdr; 2300 ip_proto = ip6->nexthdr;
2301 addr1 = (__force u32) ip6->saddr.s6_addr32[3]; 2301 addr1 = (__force u32) ip6->saddr.s6_addr32[3];
2302 addr2 = (__force u32) ip6->daddr.s6_addr32[3]; 2302 addr2 = (__force u32) ip6->daddr.s6_addr32[3];