mirror of
https://github.com/systemd/systemd.git
synced 2024-11-08 11:27:32 +03:00
resolved: change error code when trying to resolve direct LLMNR PTR RRs
If we try to resoolve an LLMNR PTR RR we shall connect via TCP directly to the specified IP address. We already refuse to do this if the address to resolve is of a different address family as the transaction's scope. The error returned was EAFNOSUPPORT. Let's change this to ESRCH which is how we indicate "not server available" when connecting for LLMNR or DNS, since that's what this really is: we have no server we could connect to in this address family. This allows us to ensure that no server errors are always handled the same way.
This commit is contained in:
parent
3fa4999b5d
commit
9318cdd374
@ -284,7 +284,7 @@ static int dns_transaction_open_tcp(DnsTransaction *t) {
|
|||||||
if (r == 0)
|
if (r == 0)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
if (family != t->scope->family)
|
if (family != t->scope->family)
|
||||||
return -EAFNOSUPPORT;
|
return -ESRCH;
|
||||||
|
|
||||||
fd = dns_scope_tcp_socket(t->scope, family, &address, LLMNR_PORT, NULL);
|
fd = dns_scope_tcp_socket(t->scope, family, &address, LLMNR_PORT, NULL);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user