]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/resolve/resolved-dns-scope.h
Merge pull request #17823 from poettering/resolved-just-bypass
[thirdparty/systemd.git] / src / resolve / resolved-dns-scope.h
index 82cd0becab7e958545f10e525585cfcef1ca7428..532f4d6b8006e11fa3a29525fe64b2387bbaf37f 100644 (file)
@@ -53,14 +53,12 @@ struct DnsScope {
 
         LIST_HEAD(DnsQueryCandidate, query_candidates);
 
-        /* Note that we keep track of ongoing transactions in two
-         * ways: once in a hashmap, indexed by the rr key, and once in
-         * a linked list. We use the hashmap to quickly find
-         * transactions we can reuse for a key. But note that there
-         * might be multiple transactions for the same key (because
-         * the zone probing can't reuse a transaction answered from
-         * the zone or the cache), and the hashmap only tracks the
-         * most recent entry. */
+        /* Note that we keep track of ongoing transactions in two ways: once in a hashmap, indexed by the rr
+         * key, and once in a linked list. We use the hashmap to quickly find transactions we can reuse for a
+         * key. But note that there might be multiple transactions for the same key (because the associated
+         * query flags might differ in incompatible ways: e.g. we may not reuse a non-validating transaction
+         * as validating. Hence we maintain a per-key list of transactions, which we iterate through to find
+         * one we can reuse with matching flags. */
         Hashmap *transactions_by_key;
         LIST_HEAD(DnsTransaction, transactions);
 
@@ -90,7 +88,7 @@ int dns_scope_mdns_membership(DnsScope *s, bool b);
 int dns_scope_make_reply_packet(DnsScope *s, uint16_t id, int rcode, DnsQuestion *q, DnsAnswer *answer, DnsAnswer *soa, bool tentative, DnsPacket **ret);
 void dns_scope_process_query(DnsScope *s, DnsStream *stream, DnsPacket *p);
 
-DnsTransaction *dns_scope_find_transaction(DnsScope *scope, DnsResourceKey *key, bool cache_ok);
+DnsTransaction *dns_scope_find_transaction(DnsScope *scope, DnsResourceKey *key, uint64_t query_flags);
 
 int dns_scope_notify_conflict(DnsScope *scope, DnsResourceRecord *rr);
 void dns_scope_check_conflicts(DnsScope *scope, DnsPacket *p);