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

Commit 7011d085 authored by Vijay Subramanian's avatar Vijay Subramanian Committed by David S. Miller
Browse files

tcp: Fix bug in tcp socket early demux



The dest port for the call to __inet_lookup_established() in TCP early demux
code is passed with the wrong endian-ness. This causes the lookup to fail
leading to early demux not being used.

Signed-off-by: default avatarVijay Subramanian <subramanian.vijay@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0b4a9e1a
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -1701,7 +1701,7 @@ int tcp_v4_early_demux(struct sk_buff *skb)
	dev = skb->dev;
	dev = skb->dev;
	sk = __inet_lookup_established(net, &tcp_hashinfo,
	sk = __inet_lookup_established(net, &tcp_hashinfo,
				       iph->saddr, th->source,
				       iph->saddr, th->source,
				       iph->daddr, th->dest,
				       iph->daddr, ntohs(th->dest),
				       dev->ifindex);
				       dev->ifindex);
	if (sk) {
	if (sk) {
		skb->sk = sk;
		skb->sk = sk;