diff options
author | Pavel Emelyanov <xemul@openvz.org> | 2008-06-16 20:13:48 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-06-16 20:13:48 -0400 |
commit | 33de014c63646f69f36f3673e3b4676f931dc878 (patch) | |
tree | c4f3afa3224fdb887b8606a7327424bf407bff93 /net/ipv6/inet6_hashtables.c | |
parent | 9f26b3add3783c0af869ea2207871da5dafefffa (diff) |
inet6: add struct net argument to inet6_ehashfn
Same as for inet_hashfn, prepare its ipv6 incarnation.
Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/inet6_hashtables.c')
-rw-r--r-- | net/ipv6/inet6_hashtables.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/ipv6/inet6_hashtables.c b/net/ipv6/inet6_hashtables.c index b940156ca4f5..a9cc8ab33a49 100644 --- a/net/ipv6/inet6_hashtables.c +++ b/net/ipv6/inet6_hashtables.c | |||
@@ -68,7 +68,7 @@ struct sock *__inet6_lookup_established(struct net *net, | |||
68 | /* Optimize here for direct hit, only listening connections can | 68 | /* Optimize here for direct hit, only listening connections can |
69 | * have wildcards anyways. | 69 | * have wildcards anyways. |
70 | */ | 70 | */ |
71 | unsigned int hash = inet6_ehashfn(daddr, hnum, saddr, sport); | 71 | unsigned int hash = inet6_ehashfn(net, daddr, hnum, saddr, sport); |
72 | struct inet_ehash_bucket *head = inet_ehash_bucket(hashinfo, hash); | 72 | struct inet_ehash_bucket *head = inet_ehash_bucket(hashinfo, hash); |
73 | rwlock_t *lock = inet_ehash_lockp(hashinfo, hash); | 73 | rwlock_t *lock = inet_ehash_lockp(hashinfo, hash); |
74 | 74 | ||
@@ -166,14 +166,14 @@ static int __inet6_check_established(struct inet_timewait_death_row *death_row, | |||
166 | const struct in6_addr *saddr = &np->daddr; | 166 | const struct in6_addr *saddr = &np->daddr; |
167 | const int dif = sk->sk_bound_dev_if; | 167 | const int dif = sk->sk_bound_dev_if; |
168 | const __portpair ports = INET_COMBINED_PORTS(inet->dport, lport); | 168 | const __portpair ports = INET_COMBINED_PORTS(inet->dport, lport); |
169 | const unsigned int hash = inet6_ehashfn(daddr, lport, saddr, | 169 | struct net *net = sock_net(sk); |
170 | const unsigned int hash = inet6_ehashfn(net, daddr, lport, saddr, | ||
170 | inet->dport); | 171 | inet->dport); |
171 | struct inet_ehash_bucket *head = inet_ehash_bucket(hinfo, hash); | 172 | struct inet_ehash_bucket *head = inet_ehash_bucket(hinfo, hash); |
172 | rwlock_t *lock = inet_ehash_lockp(hinfo, hash); | 173 | rwlock_t *lock = inet_ehash_lockp(hinfo, hash); |
173 | struct sock *sk2; | 174 | struct sock *sk2; |
174 | const struct hlist_node *node; | 175 | const struct hlist_node *node; |
175 | struct inet_timewait_sock *tw; | 176 | struct inet_timewait_sock *tw; |
176 | struct net *net = sock_net(sk); | ||
177 | 177 | ||
178 | prefetch(head->chain.first); | 178 | prefetch(head->chain.first); |
179 | write_lock(lock); | 179 | write_lock(lock); |