]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/resolve/resolved-dns-query.h
resolved: add support for answering DNSSEC questions on the stub
[thirdparty/systemd.git] / src / resolve / resolved-dns-query.h
index 133076dbf071199b91c74023fa71aaa4afb397de..a7916712c11ec6d1f1ae9eee7673ff2cb88192a7 100644 (file)
@@ -49,12 +49,13 @@ struct DnsQuery {
         DnsQuestion *question_idna;
         DnsQuestion *question_utf8;
 
+        /* If this is not a question by ourselves, but a "bypass" request, we propagate the original packet
+         * here, and use that instead. */
+        DnsPacket *question_bypass;
+
         uint64_t flags;
         int ifindex;
 
-        /* If true, the RR TTLs of the answer will be clamped by their current left validity in the cache */
-        bool clamp_ttl;
-
         DnsTransactionState state;
         unsigned n_cname_redirects;
 
@@ -71,6 +72,7 @@ struct DnsQuery {
         DnsSearchDomain *answer_search_domain;
         int answer_errno; /* if state is DNS_TRANSACTION_ERRNO */
         bool previous_redirect_unauthenticated;
+        DnsPacket *answer_full_packet;
 
         /* Bus + Varlink client information */
         sd_bus_message *bus_request;
@@ -82,9 +84,11 @@ struct DnsQuery {
         char *request_address_string;
 
         /* DNS stub information */
-        DnsPacket *request_dns_packet;
-        DnsStream *request_dns_stream;
-        DnsPacket *reply_dns_packet;
+        DnsPacket *request_packet;
+        DnsStream *request_stream;
+        DnsAnswer *reply_answer;
+        DnsAnswer *reply_authoritative;
+        DnsAnswer *reply_additional;
         DnsStubListenerExtra *stub_listener_extra;
 
         /* Completion callback */
@@ -109,7 +113,7 @@ DEFINE_TRIVIAL_CLEANUP_FUNC(DnsQueryCandidate*, dns_query_candidate_unref);
 
 void dns_query_candidate_notify(DnsQueryCandidate *c);
 
-int dns_query_new(Manager *m, DnsQuery **q, DnsQuestion *question_utf8, DnsQuestion *question_idna, int family, uint64_t flags);
+int dns_query_new(Manager *m, DnsQuery **q, DnsQuestion *question_utf8, DnsQuestion *question_idna, DnsPacket *question_bypass, int family, uint64_t flags);
 DnsQuery *dns_query_free(DnsQuery *q);
 
 int dns_query_make_auxiliary(DnsQuery *q, DnsQuery *auxiliary_for);