aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorBalazs Scheidler <bazsi@balabit.hu>2010-10-21 16:10:03 +0200
committerPatrick McHardy <kaber@trash.net>2010-10-21 16:10:03 +0200
commit0a513f6af962525ed4b3395f8c8d5daae8682aa9 (patch)
tree2f08f18708b6ec4f2621b98c0095b9698993d45d /net
parent6c46862280c5f55eda7750391bc65cd7e08c7535 (diff)
downloadmrst-s0i3-test-0a513f6af962525ed4b3395f8c8d5daae8682aa9.tar.gz
mrst-s0i3-test-0a513f6af962525ed4b3395f8c8d5daae8682aa9.tar.xz
mrst-s0i3-test-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.c3
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;