netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] tcp: Fix bug in tcp socket early demux
@ 2012-06-24  3:38 Vijay Subramanian
  2012-06-24  6:23 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Vijay Subramanian @ 2012-06-24  3:38 UTC (permalink / raw)
  To: netdev; +Cc: davem, eric.dumazet, alexander.h.duyck, Vijay Subramanian

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>
---
 net/ipv4/tcp_ipv4.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
index b52934f..1781dc6 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;
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net-next] tcp: Fix bug in tcp socket early demux
  2012-06-24  3:38 [PATCH net-next] tcp: Fix bug in tcp socket early demux Vijay Subramanian
@ 2012-06-24  6:23 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2012-06-24  6:23 UTC (permalink / raw)
  To: subramanian.vijay; +Cc: netdev, eric.dumazet, alexander.h.duyck

From: Vijay Subramanian <subramanian.vijay@gmail.com>
Date: Sat, 23 Jun 2012 20:38:10 -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>

That's what I get for only testing on big-endian :-)

Applied, thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-06-24  6:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-24  3:38 [PATCH net-next] tcp: Fix bug in tcp socket early demux Vijay Subramanian
2012-06-24  6:23 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).