From: Vijay Subramanian Date: Sat, 23 Jun 2012 17:38:10 +0000 (+0000) Subject: tcp: Fix bug in tcp socket early demux X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=7011d0851b80a1a229acfda37ce08aad903b12d1;p=sagit-ice-cold%2Fkernel_xiaomi_msm8998.git 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: Vijay Subramanian Signed-off-by: David S. Miller --- diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c index b52934f5334e..1781dc650b9d 100644 --- a/net/ipv4/tcp_ipv4.c +++ b/net/ipv4/tcp_ipv4.c @@ -1701,7 +1701,7 @@ int tcp_v4_early_demux(struct sk_buff *skb) dev = skb->dev; sk = __inet_lookup_established(net, &tcp_hashinfo, iph->saddr, th->source, - iph->daddr, th->dest, + iph->daddr, ntohs(th->dest), dev->ifindex); if (sk) { skb->sk = sk;