diff options
Diffstat (limited to 'net/ipv6')
-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); |