mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 21:38:32 +08:00
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>
This commit is contained in:
parent
6c46862280
commit
0a513f6af9
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user