]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/ipv6/inet6_hashtables.c
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
[linux-2.6-omap-h63xx.git] / net / ipv6 / inet6_hashtables.c
index 580014aea4d6f69c340e7d28fb2a508454ea9300..a9cc8ab33a49c6ebc1660caa684b0a3d775663fd 100644 (file)
@@ -68,7 +68,7 @@ struct sock *__inet6_lookup_established(struct net *net,
        /* Optimize here for direct hit, only listening connections can
         * have wildcards anyways.
         */
-       unsigned int hash = inet6_ehashfn(daddr, hnum, saddr, sport);
+       unsigned int hash = inet6_ehashfn(net, daddr, hnum, saddr, sport);
        struct inet_ehash_bucket *head = inet_ehash_bucket(hashinfo, hash);
        rwlock_t *lock = inet_ehash_lockp(hashinfo, hash);
 
@@ -104,7 +104,8 @@ struct sock *inet6_lookup_listener(struct net *net,
        int score, hiscore = 0;
 
        read_lock(&hashinfo->lhash_lock);
-       sk_for_each(sk, node, &hashinfo->listening_hash[inet_lhashfn(hnum)]) {
+       sk_for_each(sk, node,
+                       &hashinfo->listening_hash[inet_lhashfn(net, hnum)]) {
                if (net_eq(sock_net(sk), net) && inet_sk(sk)->num == hnum &&
                                sk->sk_family == PF_INET6) {
                        const struct ipv6_pinfo *np = inet6_sk(sk);
@@ -165,14 +166,14 @@ 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, lport, saddr,
+       struct net *net = sock_net(sk);
+       const unsigned int hash = inet6_ehashfn(net, daddr, lport, saddr,
                                                inet->dport);
        struct inet_ehash_bucket *head = inet_ehash_bucket(hinfo, hash);
        rwlock_t *lock = inet_ehash_lockp(hinfo, hash);
        struct sock *sk2;
        const struct hlist_node *node;
        struct inet_timewait_sock *tw;
-       struct net *net = sock_net(sk);
 
        prefetch(head->chain.first);
        write_lock(lock);