diff options
author | Balazs Scheidler <bazsi@balabit.hu> | 2010-10-21 16:10:03 +0200 |
---|---|---|
committer | Patrick McHardy <kaber@trash.net> | 2010-10-21 16:10:03 +0200 |
commit | 0a513f6af962525ed4b3395f8c8d5daae8682aa9 (patch) | |
tree | 2f08f18708b6ec4f2621b98c0095b9698993d45d /net | |
parent | 6c46862280c5f55eda7750391bc65cd7e08c7535 (diff) | |
download | linux-3.10-0a513f6af962525ed4b3395f8c8d5daae8682aa9.tar.gz linux-3.10-0a513f6af962525ed4b3395f8c8d5daae8682aa9.tar.bz2 linux-3.10-0a513f6af962525ed4b3395f8c8d5daae8682aa9.zip |
tproxy: allow non-local binds of IPv6 sockets if IP_TRANSPARENT is enabled
Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
Signed-off-by: KOVACS Krisztian <hidden@balabit.hu>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'net')
-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 56b9bf2516f..4869797c1af 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) */ 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; |