aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/af_inet6.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv6/af_inet6.c')
-rw-r--r--net/ipv6/af_inet6.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c
index 7f092fa912b..9b6a37d16fb 100644
--- a/net/ipv6/af_inet6.c
+++ b/net/ipv6/af_inet6.c
@@ -346,8 +346,11 @@ int inet6_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
346 goto out; 346 goto out;
347 } 347 }
348 348
349 if (addr_type != IPV6_ADDR_ANY) 349 if (addr_type != IPV6_ADDR_ANY) {
350 sk->sk_userlocks |= SOCK_BINDADDR_LOCK; 350 sk->sk_userlocks |= SOCK_BINDADDR_LOCK;
351 if (addr_type != IPV6_ADDR_MAPPED)
352 np->ipv6only = 1;
353 }
351 if (snum) 354 if (snum)
352 sk->sk_userlocks |= SOCK_BINDPORT_LOCK; 355 sk->sk_userlocks |= SOCK_BINDPORT_LOCK;
353 inet->sport = htons(inet->num); 356 inet->sport = htons(inet->num);