diff options
Diffstat (limited to 'net/ipv6/af_inet6.c')
-rw-r--r-- | net/ipv6/af_inet6.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c index ac8772dd968f..3150c4be3c0c 100644 --- a/net/ipv6/af_inet6.c +++ b/net/ipv6/af_inet6.c | |||
@@ -314,7 +314,8 @@ int inet6_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len) | |||
314 | */ | 314 | */ |
315 | v4addr = LOOPBACK4_IPV6; | 315 | v4addr = LOOPBACK4_IPV6; |
316 | if (!(addr_type & IPV6_ADDR_MULTICAST)) { | 316 | if (!(addr_type & IPV6_ADDR_MULTICAST)) { |
317 | if (!ipv6_chk_addr(&addr->sin6_addr, dev, 0)) { | 317 | if (!ipv6_chk_addr(&init_net, &addr->sin6_addr, |
318 | dev, 0)) { | ||
318 | if (dev) | 319 | if (dev) |
319 | dev_put(dev); | 320 | dev_put(dev); |
320 | err = -EADDRNOTAVAIL; | 321 | err = -EADDRNOTAVAIL; |