]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Do HTTPS record query from host in addition
authorPetr Menšík <pemensik@redhat.com>
Wed, 10 Jan 2024 20:25:52 +0000 (21:25 +0100)
committerPetr Špaček <pspacek@isc.org>
Tue, 18 Feb 2025 14:56:08 +0000 (14:56 +0000)
Unless explicitly specified type from host command, do fourth query for
type HTTPS RR. It is expected it will become more common and some
systems already query that record for every name.

bin/dig/host.c
bin/dig/host.rst

index 356b8a9d1be991cfd7f66cd205ef4028e44d52af..6ecf441e8db939cf4483a97b0bd046d142002b93 100644 (file)
@@ -80,6 +80,7 @@ struct rtype rtypes[] = { { 1, "has address" },
                          { 25, "has key" },
                          { 28, "has IPv6 address" },
                          { 29, "location" },
+                         { dns_rdatatype_https, "has HTTP service bindings" },
                          { 0, NULL } };
 
 static char *
@@ -457,6 +458,16 @@ printmessage(dig_query_t *query, const isc_buffer_t *msgbuf, dns_message_t *msg,
                        lookup->retries = tries;
                        ISC_LIST_APPEND(lookup_list, lookup, link);
                }
+               lookup = clone_lookup(query->lookup, false);
+               if (lookup != NULL) {
+                       strlcpy(lookup->textname, namestr,
+                               sizeof(lookup->textname));
+                       lookup->rdtype = dns_rdatatype_https;
+                       lookup->rdtypeset = true;
+                       lookup->origin = NULL;
+                       lookup->retries = tries;
+                       ISC_LIST_APPEND(lookup_list, lookup, link);
+               }
        }
 
        if (!short_form) {
index 2647d36a73c428dca7a7e2051d593b7e71d6a353..71a736dde393d0e02577f40e9638e81310d9092f 100644 (file)
@@ -122,7 +122,7 @@ Options
    CNAME, NS, SOA, TXT, DNSKEY, AXFR, etc.
 
    When no query type is specified, :program:`host` automatically selects an
-   appropriate query type. By default, it looks for A, AAAA, and MX
+   appropriate query type. By default, it looks for A, AAAA, MX, and HTTPS
    records. If the :option:`-C` option is given, queries are made for SOA
    records. If ``name`` is a dotted-decimal IPv4 address or
    colon-delimited IPv6 address, :program:`host` queries for PTR records.