mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-10-28 11:55:23 +03:00
resolved: add extra check for family when doing LLMNR TCP connections
It shouldn't happen that we try to resolve IPv4 addresses via LLMNR on IPv6 and vice versa, but let's explicitly verify that we don't turn an IPv4 LLMNR lookup into an IPv6 TCP connection.
This commit is contained in:
parent
0a18f3e59f
commit
9e08a6e0ce
@ -271,6 +271,8 @@ static int dns_transaction_open_tcp(DnsTransaction *t) {
|
||||
return r;
|
||||
if (r == 0)
|
||||
return -EINVAL;
|
||||
if (family != t->scope->family)
|
||||
return -EAFNOSUPPORT;
|
||||
|
||||
fd = dns_scope_tcp_socket(t->scope, family, &address, LLMNR_PORT, NULL);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user