resolved: restore ANY reply behaviour for mDNS

This restores behaviour of 53fda2bb93: for
mDNS (and mDNS only) we'll match replies to transactions honouring ANY
matches.
This commit is contained in:
Lennart Poettering
2017-02-14 11:13:58 +01:00
parent fc0195fabf
commit 4841358290
+13
View File
@@ -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);