mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-03 01:17:45 +03:00
resolved: disable SO_BINDTOIFINDEX hack for localhost IP addresses
Fixes: #23010 (cherry picked from commit5f9041afec
) (cherry picked from commita0532ffd2f
) (cherry picked from commit640acfb459
)
This commit is contained in:
parent
652c6054f1
commit
079bfa7d76
@ -474,7 +474,8 @@ static int dns_scope_socket(
|
||||
* host result in EHOSTUNREACH, since Linux won't send the packets out of the specified
|
||||
* interface, but delivers them directly to the local socket. */
|
||||
if (s->link &&
|
||||
!manager_find_link_address(s->manager, sa.sa.sa_family, sockaddr_in_addr(&sa.sa))) {
|
||||
!manager_find_link_address(s->manager, sa.sa.sa_family, sockaddr_in_addr(&sa.sa)) &&
|
||||
in_addr_is_localhost(sa.sa.sa_family, sockaddr_in_addr(&sa.sa)) == 0) {
|
||||
r = socket_bind_to_ifindex(fd, ifindex);
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
Loading…
Reference in New Issue
Block a user