diff options
Diffstat (limited to 'net/ipv6/af_inet6.c')
-rw-r--r-- | net/ipv6/af_inet6.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c index 56b9bf2516f4..54e8e42f7a88 100644 --- a/net/ipv6/af_inet6.c +++ b/net/ipv6/af_inet6.c | |||
@@ -343,7 +343,8 @@ int inet6_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len) | |||
343 | */ | 343 | */ |
344 | v4addr = LOOPBACK4_IPV6; | 344 | v4addr = LOOPBACK4_IPV6; |
345 | if (!(addr_type & IPV6_ADDR_MULTICAST)) { | 345 | if (!(addr_type & IPV6_ADDR_MULTICAST)) { |
346 | if (!ipv6_chk_addr(net, &addr->sin6_addr, | 346 | if (!inet->transparent && |
347 | !ipv6_chk_addr(net, &addr->sin6_addr, | ||
347 | dev, 0)) { | 348 | dev, 0)) { |
348 | err = -EADDRNOTAVAIL; | 349 | err = -EADDRNOTAVAIL; |
349 | goto out_unlock; | 350 | goto out_unlock; |
@@ -467,7 +468,7 @@ int inet6_getname(struct socket *sock, struct sockaddr *uaddr, | |||
467 | if (ipv6_addr_type(&sin->sin6_addr) & IPV6_ADDR_LINKLOCAL) | 468 | if (ipv6_addr_type(&sin->sin6_addr) & IPV6_ADDR_LINKLOCAL) |
468 | sin->sin6_scope_id = sk->sk_bound_dev_if; | 469 | sin->sin6_scope_id = sk->sk_bound_dev_if; |
469 | *uaddr_len = sizeof(*sin); | 470 | *uaddr_len = sizeof(*sin); |
470 | return(0); | 471 | return 0; |
471 | } | 472 | } |
472 | 473 | ||
473 | EXPORT_SYMBOL(inet6_getname); | 474 | EXPORT_SYMBOL(inet6_getname); |
@@ -488,7 +489,7 @@ int inet6_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) | |||
488 | case SIOCADDRT: | 489 | case SIOCADDRT: |
489 | case SIOCDELRT: | 490 | case SIOCDELRT: |
490 | 491 | ||
491 | return(ipv6_route_ioctl(net, cmd, (void __user *)arg)); | 492 | return ipv6_route_ioctl(net, cmd, (void __user *)arg); |
492 | 493 | ||
493 | case SIOCSIFADDR: | 494 | case SIOCSIFADDR: |
494 | return addrconf_add_ifaddr(net, (void __user *) arg); | 495 | return addrconf_add_ifaddr(net, (void __user *) arg); |
@@ -502,7 +503,7 @@ int inet6_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) | |||
502 | return sk->sk_prot->ioctl(sk, cmd, arg); | 503 | return sk->sk_prot->ioctl(sk, cmd, arg); |
503 | } | 504 | } |
504 | /*NOTREACHED*/ | 505 | /*NOTREACHED*/ |
505 | return(0); | 506 | return 0; |
506 | } | 507 | } |
507 | 508 | ||
508 | EXPORT_SYMBOL(inet6_ioctl); | 509 | EXPORT_SYMBOL(inet6_ioctl); |