summaryrefslogtreecommitdiffstats
path: root/src/resolve/resolved-mdns.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2017-02-14 11:12:08 +0100
committerLennart Poettering <lennart@poettering.net>2017-02-14 11:13:58 +0100
commit48413582909ce6fa139e91bfc09b934c79c73d06 (patch)
tree1853b4fc33793ab06efc63cd728e78b5012fffb3 /src/resolve/resolved-mdns.c
parentresolved: size the mdns announce answer array properly (diff)
downloadsystemd-48413582909ce6fa139e91bfc09b934c79c73d06.tar.xz
systemd-48413582909ce6fa139e91bfc09b934c79c73d06.zip
resolved: restore ANY reply behaviour for mDNS
This restores behaviour of 53fda2bb933694c9bdb1bbf1f5583e39673b74b2: for mDNS (and mDNS only) we'll match replies to transactions honouring ANY matches.
Diffstat (limited to 'src/resolve/resolved-mdns.c')
-rw-r--r--src/resolve/resolved-mdns.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/resolve/resolved-mdns.c b/src/resolve/resolved-mdns.c
index aa7661b5ad..c40e8f75f0 100644
--- a/src/resolve/resolved-mdns.c
+++ b/src/resolve/resolved-mdns.c
@@ -171,6 +171,19 @@ static int on_mdns_packet(sd_event_source *s, int fd, uint32_t revents, void *us
t = dns_scope_find_transaction(scope, rr->key, false);
if (t)
dns_transaction_process_reply(t, p);
+
+ /* Also look for the various types of ANY transactions */
+ t = dns_scope_find_transaction(scope, &DNS_RESOURCE_KEY_CONST(rr->key->class, DNS_TYPE_ANY, dns_resource_key_name(rr->key)), false);
+ if (t)
+ dns_transaction_process_reply(t, p);
+
+ t = dns_scope_find_transaction(scope, &DNS_RESOURCE_KEY_CONST(DNS_CLASS_ANY, rr->key->type, dns_resource_key_name(rr->key)), false);
+ if (t)
+ dns_transaction_process_reply(t, p);
+
+ t = dns_scope_find_transaction(scope, &DNS_RESOURCE_KEY_CONST(DNS_CLASS_ANY, DNS_TYPE_ANY, dns_resource_key_name(rr->key)), false);
+ if (t)
+ dns_transaction_process_reply(t, p);
}
dns_cache_put(&scope->cache, NULL, DNS_PACKET_RCODE(p), p->answer, false, (uint32_t) -1, 0, p->family, &p->sender);