Commit-ID: dbe5775bbc00116ed5699babfe17c54f32eb34c3 Gitweb: http://git.kernel.org/tip/dbe5775bbc00116ed5699babfe17c54f32eb34c3 Author: Changli Gao <xiaosuo@xxxxxxxxx> AuthorDate: Tue, 17 Aug 2010 19:01:38 +0000 Committer: David S. Miller <davem@xxxxxxxxxxxxx> CommitDate: Thu, 19 Aug 2010 17:10:38 -0700 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 <xiaosuo@xxxxxxxxx> Acked-by: Eric Dumazet <eric.dumazet@xxxxxxxxx> Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx> --- net/core/dev.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/net/core/dev.c b/net/core/dev.c index cf87fde..7e97e89 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; -- To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html