* [PATCH 2.6.20.y & net-2.6] [IPV6] HASHTABLES: Use appropriate seed for caluculating ehash index.
@ 2007-02-13 0:48 YOSHIFUJI Hideaki / 吉藤英明
2007-02-13 4:26 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: YOSHIFUJI Hideaki / 吉藤英明 @ 2007-02-13 0:48 UTC (permalink / raw)
To: davem; +Cc: netdev, stable, yoshfuji, handat
Tetsuo Handa <handat@pm.nttdata.co.jp> told me that connect(2) with TCPv6
socket almost always took a few minutes to return when we did not have any
ports available in the range of net.ipv4.ip_local_port_range.
The reason was that we used incorrect seed for calculating index of
hash when we check established sockets in __inet6_check_established().
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
---
net/ipv6/inet6_hashtables.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/net/ipv6/inet6_hashtables.c b/net/ipv6/inet6_hashtables.c
index 30b16da..ae6b0e7 100644
--- a/net/ipv6/inet6_hashtables.c
+++ b/net/ipv6/inet6_hashtables.c
@@ -172,7 +172,7 @@ static int __inet6_check_established(struct inet_timewait_death_row *death_row,
const struct in6_addr *saddr = &np->daddr;
const int dif = sk->sk_bound_dev_if;
const __portpair ports = INET_COMBINED_PORTS(inet->dport, lport);
- const unsigned int hash = inet6_ehashfn(daddr, inet->num, saddr,
+ const unsigned int hash = inet6_ehashfn(daddr, lport, saddr,
inet->dport);
struct inet_ehash_bucket *head = inet_ehash_bucket(hinfo, hash);
struct sock *sk2;
--
1.4.4.1.g562ce
--
YOSHIFUJI Hideaki @ USAGI Project <yoshfuji@linux-ipv6.org>
GPG-FP : 9022 65EB 1ECF 3AD1 0BDF 80D8 4807 F894 E062 0EEA
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 2.6.20.y & net-2.6] [IPV6] HASHTABLES: Use appropriate seed for caluculating ehash index.
2007-02-13 0:48 [PATCH 2.6.20.y & net-2.6] [IPV6] HASHTABLES: Use appropriate seed for caluculating ehash index YOSHIFUJI Hideaki / 吉藤英明
@ 2007-02-13 4:26 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2007-02-13 4:26 UTC (permalink / raw)
To: yoshfuji; +Cc: netdev, stable, handat
From: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Date: Tue, 13 Feb 2007 09:48:41 +0900 (JST)
> Tetsuo Handa <handat@pm.nttdata.co.jp> told me that connect(2) with TCPv6
> socket almost always took a few minutes to return when we did not have any
> ports available in the range of net.ipv4.ip_local_port_range.
>
> The reason was that we used incorrect seed for calculating index of
> hash when we check established sockets in __inet6_check_established().
>
> Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Thank you for this bug fix, applied.
Here is my signoff for -stable.
Signed-off-by: David S. Miller <davem@davemloft.net>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-02-13 4:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-13 0:48 [PATCH 2.6.20.y & net-2.6] [IPV6] HASHTABLES: Use appropriate seed for caluculating ehash index YOSHIFUJI Hideaki / 吉藤英明
2007-02-13 4:26 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.