From: Changli Gao Date: Tue, 17 Aug 2010 19:01:38 +0000 (+0000) Subject: net: rps: skip fragment when computing rxhash X-Git-Tag: MMI-PSA29.97-13-9~21994^2~747 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=dbe5775bbc00116ed5699babfe17c54f32eb34c3;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git net: rps: skip fragment when computing rxhash Fragmented IP packets may have no transfer header, so when computing rxhash, we should skip them. Signed-off-by: Changli Gao Acked-by: Eric Dumazet Signed-off-by: David S. Miller --- diff --git a/net/core/dev.c b/net/core/dev.c index cf87fde3a29b..7e97e891636e 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -2284,7 +2284,10 @@ __u32 __skb_get_rxhash(struct sk_buff *skb) goto done; ip = (struct iphdr *) skb->data + nhoff; - ip_proto = ip->protocol; + if (ip->frag_off & htons(IP_MF | IP_OFFSET)) + ip_proto = 0; + else + ip_proto = ip->protocol; addr1 = (__force u32) ip->saddr; addr2 = (__force u32) ip->daddr; ihl = ip->ihl;