summaryrefslogtreecommitdiff
path: root/src/resolve/resolved-dns-scope.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2020-11-05 11:01:36 +0100
committerLennart Poettering <lennart@poettering.net>2021-02-09 17:53:10 +0100
commitd8f3836ea9ddbe74e575803d833e845825eb8e54 (patch)
tree767ed247c15a7e2cf0bfe28751090f6ab414410d /src/resolve/resolved-dns-scope.c
parent6f76e68a3c2a986600bc1bbdce957b9415b06db7 (diff)
downloadsystemd-d8f3836ea9ddbe74e575803d833e845825eb8e54.tar.gz
resolved: DNS_CLASS_ANY lookups are OK too
Diffstat (limited to 'src/resolve/resolved-dns-scope.c')
-rw-r--r--src/resolve/resolved-dns-scope.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/resolve/resolved-dns-scope.c b/src/resolve/resolved-dns-scope.c
index 15a3120e1a..6573edd630 100644
--- a/src/resolve/resolved-dns-scope.c
+++ b/src/resolve/resolved-dns-scope.c
@@ -646,11 +646,10 @@ bool dns_scope_good_key(DnsScope *s, const DnsResourceKey *key) {
assert(s);
assert(key);
- /* Check if it makes sense to resolve the specified key on
- * this scope. Note that this call assumes as fully qualified
- * name, i.e. the search suffixes already appended. */
+ /* Check if it makes sense to resolve the specified key on this scope. Note that this call assumes a
+ * fully qualified name, i.e. the search suffixes already appended. */
- if (key->class != DNS_CLASS_IN)
+ if (!IN_SET(key->class, DNS_CLASS_IN, DNS_CLASS_ANY))
return false;
if (s->protocol == DNS_PROTOCOL_DNS) {
@@ -672,8 +671,7 @@ bool dns_scope_good_key(DnsScope *s, const DnsResourceKey *key) {
return !dns_name_is_root(name);
}
- /* On mDNS and LLMNR, send A and AAAA queries only on the
- * respective scopes */
+ /* On mDNS and LLMNR, send A and AAAA queries only on the respective scopes */
key_family = dns_type_to_af(key->type);
if (key_family < 0)