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

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: NChangli Gao <xiaosuo@gmail.com>
Acked-by: NEric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 2d47b459
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册