]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
resolved: change error code when trying to resolve direct LLMNR PTR RRs 1023/head
authorLennart Poettering <lennart@poettering.net>
Mon, 24 Aug 2015 21:47:28 +0000 (23:47 +0200)
committerLennart Poettering <lennart@poettering.net>
Mon, 24 Aug 2015 21:47:28 +0000 (23:47 +0200)
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.

src/resolve/resolved-dns-transaction.c

index 608decd3ac8480a1087c1de3e5882d3fe6119034..bbbc6377a81c03aab99519a6f410b3dcf5109f0e 100644 (file)
@@ -284,7 +284,7 @@ static int dns_transaction_open_tcp(DnsTransaction *t) {
                         if (r == 0)
                                 return -EINVAL;
                         if (family != t->scope->family)
-                                return -EAFNOSUPPORT;
+                                return -ESRCH;
 
                         fd = dns_scope_tcp_socket(t->scope, family, &address, LLMNR_PORT, NULL);
                 }