]> git.karo-electronics.de Git - linux-beck.git/commitdiff
tcp: Fix bug in tcp socket early demux
authorVijay Subramanian <subramanian.vijay@gmail.com>
Sat, 23 Jun 2012 17:38:10 +0000 (17:38 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sun, 24 Jun 2012 06:22:38 +0000 (23:22 -0700)
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 <subramanian.vijay@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp_ipv4.c

index b52934f5334e2f56089d61d288af07108acc6104..1781dc650b9d3f07408e253a6b6258440acd3ac8 100644 (file)
@@ -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;