From: Balazs Scheidler Date: Thu, 21 Oct 2010 14:10:03 +0000 (+0200) Subject: tproxy: allow non-local binds of IPv6 sockets if IP_TRANSPARENT is enabled X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=0a513f6af962525ed4b3395f8c8d5daae8682aa9;p=linux-beck.git tproxy: allow non-local binds of IPv6 sockets if IP_TRANSPARENT is enabled Signed-off-by: Balazs Scheidler Signed-off-by: KOVACS Krisztian Signed-off-by: Patrick McHardy --- diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c index 56b9bf2516f4..4869797c1afa 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;