Skip to content

Commit

Permalink
tcp: Fix bug in tcp socket early demux
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Vijay Subramanian authored and David S. Miller committed Jun 24, 2012
1 parent 0b4a9e1 commit 7011d08
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/ipv4/tcp_ipv4.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 7011d08

Please sign in to comment.