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

add "dig +qid" option to set QID to desired value

This commit is contained in:
Evan Hunt
2020-05-08 12:39:16 -07:00
parent 0ef6dde124
commit 23f2ab4543
5 changed files with 38 additions and 1 deletions

View File

@@ -1489,6 +1489,24 @@ plus_option(char *option, bool is_batchfile, dig_lookup_t *lookup) {
break;
case 'q':
switch (cmd[1]) {
case 'i': /* qid */
FULLCHECK("qid");
if (!state) {
lookup->setqid = false;
lookup->qid = 0;
break;
}
if (value == NULL) {
goto need_value;
}
result = parse_uint(&num, value, MAXQID, "qid");
if (result != ISC_R_SUCCESS) {
warn("Couldn't parse qid");
goto exit_or_usage;
}
lookup->setqid = true;
lookup->qid = num;
break;
case 'r': /* qr */
FULLCHECK("qr");
lookup->qr = state;