Skip to content

Commit 0a513f6

Browse files
bazsikaber
authored andcommitted
tproxy: allow non-local binds of IPv6 sockets if IP_TRANSPARENT is enabled
Signed-off-by: Balazs Scheidler <[email protected]> Signed-off-by: KOVACS Krisztian <[email protected]> Signed-off-by: Patrick McHardy <[email protected]>
1 parent 6c46862 commit 0a513f6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

net/ipv6/af_inet6.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,8 @@ int inet6_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
343343
*/
344344
v4addr = LOOPBACK4_IPV6;
345345
if (!(addr_type & IPV6_ADDR_MULTICAST)) {
346-
if (!ipv6_chk_addr(net, &addr->sin6_addr,
346+
if (!inet->transparent &&
347+
!ipv6_chk_addr(net, &addr->sin6_addr,
347348
dev, 0)) {
348349
err = -EADDRNOTAVAIL;
349350
goto out_unlock;

0 commit comments

Comments
 (0)