Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dbe5775b authored by Changli Gao's avatar Changli Gao Committed by David S. Miller
Browse files

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: default avatarChangli Gao <xiaosuo@gmail.com>
Acked-by: default avatarEric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 2d47b459
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -2284,6 +2284,9 @@ __u32 __skb_get_rxhash(struct sk_buff *skb)
			goto done;

		ip = (struct iphdr *) skb->data + nhoff;
		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;