提交 1003489e 编写于 作者: C Changli Gao 提交者: David S. Miller

net: rps: fix the wrong network header pointer

__skb_get_rxhash() was broken after the commit:

 commit bfb564e7
 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: NChangli Gao <xiaosuo@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 eb4d4065
...@@ -2283,7 +2283,7 @@ __u32 __skb_get_rxhash(struct sk_buff *skb) ...@@ -2283,7 +2283,7 @@ __u32 __skb_get_rxhash(struct sk_buff *skb)
if (!pskb_may_pull(skb, sizeof(*ip) + nhoff)) if (!pskb_may_pull(skb, sizeof(*ip) + nhoff))
goto done; goto done;
ip = (struct iphdr *) skb->data + nhoff; ip = (struct iphdr *) (skb->data + nhoff);
if (ip->frag_off & htons(IP_MF | IP_OFFSET)) if (ip->frag_off & htons(IP_MF | IP_OFFSET))
ip_proto = 0; ip_proto = 0;
else else
...@@ -2296,7 +2296,7 @@ __u32 __skb_get_rxhash(struct sk_buff *skb) ...@@ -2296,7 +2296,7 @@ __u32 __skb_get_rxhash(struct sk_buff *skb)
if (!pskb_may_pull(skb, sizeof(*ip6) + nhoff)) if (!pskb_may_pull(skb, sizeof(*ip6) + nhoff))
goto done; goto done;
ip6 = (struct ipv6hdr *) skb->data + nhoff; ip6 = (struct ipv6hdr *) (skb->data + nhoff);
ip_proto = ip6->nexthdr; ip_proto = ip6->nexthdr;
addr1 = (__force u32) ip6->saddr.s6_addr32[3]; addr1 = (__force u32) ip6->saddr.s6_addr32[3];
addr2 = (__force u32) ip6->daddr.s6_addr32[3]; addr2 = (__force u32) ip6->daddr.s6_addr32[3];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册