]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
fix consistency check for delv +ns and +qmin
authorEvan Hunt <each@isc.org>
Wed, 1 Nov 2023 16:00:45 +0000 (17:00 +0100)
committerEvan Hunt <each@isc.org>
Thu, 7 Dec 2023 01:31:39 +0000 (17:31 -0800)
the code to prevent +qmin from being used without +ns was
in the wrong place, resulting in it only working correctly
if +ns was specified first.

bin/delv/delv.c

index 25ff05e857c320f740c4da3e3338a5a1f3b09822..16e005ab7fed40114818e062d46a32ccf34a99c2 100644 (file)
@@ -1378,10 +1378,6 @@ plus_option(char *option) {
                fprintf(stderr, "Invalid option: +%s\n", option);
                usage();
        }
-
-       if (qmin && !fulltrace) {
-               fatal("'+qmin' cannot be used without '+ns'");
-       }
        return;
 }
 
@@ -1730,6 +1726,11 @@ parse_args(int argc, char **argv) {
                }
        }
 
+       /* check consistency */
+       if (qmin && !fulltrace) {
+               fatal("'+qmin' cannot be used without '+ns'");
+       }
+
        /*
         * If no qname or qtype specified, search for root/NS
         * If no qtype specified, use A