aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/inet6_connection_sock.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv6/inet6_connection_sock.c')
-rw-r--r--net/ipv6/inet6_connection_sock.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/net/ipv6/inet6_connection_sock.c b/net/ipv6/inet6_connection_sock.c
index b386a2ce4c6f..9bfab19ff3c0 100644
--- a/net/ipv6/inet6_connection_sock.c
+++ b/net/ipv6/inet6_connection_sock.c
@@ -31,7 +31,6 @@ int inet6_csk_bind_conflict(const struct sock *sk,
31 const struct inet_bind_bucket *tb, bool relax) 31 const struct inet_bind_bucket *tb, bool relax)
32{ 32{
33 const struct sock *sk2; 33 const struct sock *sk2;
34 const struct hlist_node *node;
35 int reuse = sk->sk_reuse; 34 int reuse = sk->sk_reuse;
36 int reuseport = sk->sk_reuseport; 35 int reuseport = sk->sk_reuseport;
37 kuid_t uid = sock_i_uid((struct sock *)sk); 36 kuid_t uid = sock_i_uid((struct sock *)sk);
@@ -41,7 +40,7 @@ int inet6_csk_bind_conflict(const struct sock *sk,
41 * See comment in inet_csk_bind_conflict about sock lookup 40 * See comment in inet_csk_bind_conflict about sock lookup
42 * vs net namespaces issues. 41 * vs net namespaces issues.
43 */ 42 */
44 sk_for_each_bound(sk2, node, &tb->owners) { 43 sk_for_each_bound(sk2, &tb->owners) {
45 if (sk != sk2 && 44 if (sk != sk2 &&
46 (!sk->sk_bound_dev_if || 45 (!sk->sk_bound_dev_if ||
47 !sk2->sk_bound_dev_if || 46 !sk2->sk_bound_dev_if ||
@@ -58,7 +57,7 @@ int inet6_csk_bind_conflict(const struct sock *sk,
58 } 57 }
59 } 58 }
60 59
61 return node != NULL; 60 return sk2 != NULL;
62} 61}
63 62
64EXPORT_SYMBOL_GPL(inet6_csk_bind_conflict); 63EXPORT_SYMBOL_GPL(inet6_csk_bind_conflict);