Commit f2e843c4 authored by Mark Andrews's avatar Mark Andrews

Allow UDP delay to be configured on the command line

parent 2cfceed0
Pipeline #8925 passed with stages
in 1 minute and 11 seconds
......@@ -129,6 +129,7 @@ static int json = 0;
static int unique = 0;
static int useglue = 0;
static int glueonly = 0;
static int udpdelay = 113000;
static const char *jrec = "{ \"data\": [ ";
static const char *jfin = "{ }";
......@@ -1933,7 +1934,8 @@ check(char *zone, char *ns, char *address, struct summary *parent, int port) {
dotest(item, usec);
if (serial)
break;
usec += 113000;
if (!opts[item->test].tcp)
usec += udpdelay;
}
report(summary); /* Release reference. */
}
......@@ -3897,7 +3899,7 @@ main(int argc, char **argv) {
int on = 1;
int port = 53;
while ((n = getopt(argc, argv, "46abBcdDeEfgGi:I:jLm:nopP:r:RstTu")) != -1) {
while ((n = getopt(argc, argv, "46abBcdDeEfgGi:I:jLm:nopP:r:RstTuU:")) != -1) {
switch (n) {
case '4': ipv4only = 1; ipv6only = 0; break;
case '6': ipv6only = 1; ipv4only = 0; break;
......@@ -3967,6 +3969,13 @@ main(int argc, char **argv) {
}
exit (0);
case 'u': unique = 1; break;
case 'U':
{
int tmp = atoi(optarg);
if (tmp >= 0 && tmp <= 1000) {
udpdelay = tmp * 1000;
}
}
default:
printf("usage: genreport [-46abBcdeEfgGjLnopstT] "
"[-i test] [-I test] [-m maxoutstanding] "
......@@ -4000,6 +4009,7 @@ main(int argc, char **argv) {
printf("\t-t: type tests (serial)\n");
printf("\t-T: print type list for type test (-t)\n");
printf("\t-u: unique IP address\n");
printf("\t-U: UDP delay [0..1000]\n");
exit(0);
}
}
......
......@@ -120,6 +120,9 @@ with EDNS, FULL or COMM tests you need to specify them after the -t switch.
**-u**
: only test a IP address once.
**-U**
: delay between UDP requests to a server in milliseconds (default: 113, range: [0..1000]).
# EXAMPLES
## Test all servers for a zone
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment