2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 22:45:39 +00:00

new: usr: Add HTTPS record query to host command line tool

The host command was extended to also query for the HTTPS RR type by default.

Merge branch 'feature/main/host-rr-https' into 'main'

See merge request isc-projects/bind9!8642
This commit is contained in:
Petr Špaček
2025-02-18 14:56:39 +00:00
2 changed files with 12 additions and 1 deletions

View File

@@ -80,6 +80,7 @@ struct rtype rtypes[] = { { 1, "has address" },
{ 25, "has key" }, { 25, "has key" },
{ 28, "has IPv6 address" }, { 28, "has IPv6 address" },
{ 29, "location" }, { 29, "location" },
{ dns_rdatatype_https, "has HTTP service bindings" },
{ 0, NULL } }; { 0, NULL } };
static char * static char *
@@ -457,6 +458,16 @@ printmessage(dig_query_t *query, const isc_buffer_t *msgbuf, dns_message_t *msg,
lookup->retries = tries; lookup->retries = tries;
ISC_LIST_APPEND(lookup_list, lookup, link); 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) { if (!short_form) {

View File

@@ -122,7 +122,7 @@ Options
CNAME, NS, SOA, TXT, DNSKEY, AXFR, etc. CNAME, NS, SOA, TXT, DNSKEY, AXFR, etc.
When no query type is specified, :program:`host` automatically selects an 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 the :option:`-C` option is given, queries are made for SOA
records. If ``name`` is a dotted-decimal IPv4 address or records. If ``name`` is a dotted-decimal IPv4 address or
colon-delimited IPv6 address, :program:`host` queries for PTR records. colon-delimited IPv6 address, :program:`host` queries for PTR records.