1
0
Fork 0

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>
wifi-calibration
Balazs Scheidler 2010-10-21 16:10:03 +02:00 committed by Patrick McHardy
parent 6c46862280
commit 0a513f6af9
1 changed files with 2 additions and 1 deletions

View 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;