diff options
Diffstat (limited to 'net/ipv6/tcp_ipv6.c')
-rw-r--r-- | net/ipv6/tcp_ipv6.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c index aa12a26a96c6..c0f7e69f2e6c 100644 --- a/net/ipv6/tcp_ipv6.c +++ b/net/ipv6/tcp_ipv6.c | |||
@@ -176,8 +176,7 @@ static int tcp_v6_connect(struct sock *sk, struct sockaddr *uaddr, | |||
176 | /* If interface is set while binding, indices | 176 | /* If interface is set while binding, indices |
177 | * must coincide. | 177 | * must coincide. |
178 | */ | 178 | */ |
179 | if (sk->sk_bound_dev_if && | 179 | if (!sk_dev_equal_l3scope(sk, usin->sin6_scope_id)) |
180 | sk->sk_bound_dev_if != usin->sin6_scope_id) | ||
181 | return -EINVAL; | 180 | return -EINVAL; |
182 | 181 | ||
183 | sk->sk_bound_dev_if = usin->sin6_scope_id; | 182 | sk->sk_bound_dev_if = usin->sin6_scope_id; |