tproxy: allow non-local binds of IPv6 sockets if IP_TRANSPARENT is enabled
authorBalazs Scheidler <bazsi@balabit.hu>
Thu, 21 Oct 2010 14:10:03 +0000 (16:10 +0200)
committerPatrick McHardy <kaber@trash.net>
Thu, 21 Oct 2010 14:10:03 +0000 (16:10 +0200)
Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
Signed-off-by: KOVACS Krisztian <hidden@balabit.hu>
Signed-off-by: Patrick McHardy <kaber@trash.net>
net/ipv6/af_inet6.c

index 56b9bf2516f4d45b5b866e1e3086f54a05a7b530..4869797c1afa1486fb93c64d5e5b4ac7a70d37f4 100644 (file)
@@ -343,7 +343,8 @@ int inet6_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
                         */
                        v4addr = LOOPBACK4_IPV6;
                        if (!(addr_type & IPV6_ADDR_MULTICAST)) {
-                               if (!ipv6_chk_addr(net, &addr->sin6_addr,
+                               if (!inet->transparent &&
+                                   !ipv6_chk_addr(net, &addr->sin6_addr,
                                                   dev, 0)) {
                                        err = -EADDRNOTAVAIL;
                                        goto out_unlock;