]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
add explicit error for +trace argument
authorEvan Hunt <each@isc.org>
Wed, 15 Feb 2023 00:56:51 +0000 (16:56 -0800)
committerEvan Hunt <each@isc.org>
Tue, 28 Mar 2023 19:39:05 +0000 (12:39 -0700)
add a specific error message when someone tries to use
"delv +trace" suggesting "delv +ns" instead.

bin/delv/delv.c

index 617bc0f1d4671e32fd6a713247df914a3914646f..485b193d117f23f87ffc88cb5788d070dba2ac5e 100644 (file)
@@ -1275,8 +1275,19 @@ plus_option(char *option) {
                        use_tcp = state;
                        break;
                case 'r':
-                       FULLCHECK("trust");
-                       showtrust = state;
+                       switch (cmd[2]) {
+                       case 'a': /* trace */
+                               FULLCHECK("trace");
+                               fatal("Invalid argument +trace. For "
+                                     "delegation path tracing, use +ns.");
+                               break;
+                       case 'u': /* trust */
+                               FULLCHECK("trust");
+                               showtrust = state;
+                               break;
+                       default:
+                               goto invalid_option;
+                       }
                        break;
                case 't': /* ttl */
                        FULLCHECK("ttl");