static bool use_ipv4 = true, use_ipv6 = true;
static bool cdflag = false, no_sigs = false, root_validation = true;
+static bool qmin = false, qmin_strict = false;
static bool use_tcp = false;
"server)\n"
" +[no]multiline (Print records in an "
"expanded format)\n"
+ " +[no]qmin[=mode] (QNAME minimization: "
+ "relaxed or strict)\n"
" +[no]root (DNSSEC validation trust "
"anchor)\n"
" +[no]rrcomments (Control display of "
goto invalid_option;
}
break;
+ case 'q': /* qmin */
+ FULLCHECK("qmin");
+ if (state) {
+ if (value == NULL || strcasecmp(value, "relaxed") == 0)
+ {
+ qmin = true;
+ } else if (strcasecmp(value, "strict") == 0) {
+ qmin = true;
+ qmin_strict = true;
+ } else {
+ fatal("Invalid qmin option '%s': "
+ "use 'relaxed' or 'strict'\n",
+ value);
+ }
+ } else {
+ qmin = false;
+ qmin_strict = false;
+ }
+ break;
case 'r':
switch (cmd[1]) {
case 'o': /* root */
fprintf(stderr, "Invalid option: +%s\n", option);
usage();
}
+
+ if (qmin && !fulltrace) {
+ fatal("'+qmin' cannot be used without '+ns'");
+ }
return;
}
dns_view_sethints(view, roothints);
dns_db_detach(&roothints);
+ view->qminimization = qmin;
+ view->qmin_strict = qmin_strict;
+
CHECK(dns_view_initsecroots(view, mctx));
CHECK(setup_dnsseckeys(NULL, view));
replicates the behavior of a recursive name server with a cold cache
that is processing a recursive query.
+.. option:: +qmin[=MODE], +noqmin
+
+ When used with ``+ns``, this option enables QNAME minimization mode.
+ Valid options of MODE are ``relaxed`` and ``strict``. By default,
+ QNAME minimization is disabled. If ``+qmin`` is specified but MODE
+ is omitted, then ``relaxed`` mode will be used.
+
.. option:: +ttl, +nottl
This option controls whether to display the TTL when printing a record. The