From 0d66f91c91c861a04a2cbe13aa37d432530e8a35 Mon Sep 17 00:00:00 2001 From: Willem Toorop Date: Wed, 23 Mar 2016 23:31:23 +0100 Subject: [PATCH] getdns_query option for APPEND_NAME_TO_SINGLE_LABEL_FIRST --- src/test/getdns_query.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/test/getdns_query.c b/src/test/getdns_query.c index 2e70bab2..b0f1ec31 100644 --- a/src/test/getdns_query.c +++ b/src/test/getdns_query.c @@ -518,7 +518,8 @@ print_usage(FILE *out, const char *progname) fprintf(out, "\t-S\tservice lookup ( is ignored)\n"); fprintf(out, "\t-t \tSet timeout in miliseconds\n"); - fprintf(out, "\t-W\tAppend suffix always (default)\n"); + fprintf(out, "\t-0\tAppend suffix to single label first (default)\n"); + fprintf(out, "\t-W\tAppend suffix always\n"); fprintf(out, "\t-1\tAppend suffix only to single label after failure\n"); fprintf(out, "\t-M\tAppend suffix only to multi label name after failure\n"); fprintf(out, "\t-N\tNever append a suffix\n"); @@ -1033,6 +1034,10 @@ getdns_return_t parse_args(int argc, char **argv) (void) getdns_context_set_append_name(context, GETDNS_APPEND_NAME_ONLY_TO_SINGLE_LABEL_AFTER_FAILURE); break; + case '0': + (void) getdns_context_set_append_name(context, + GETDNS_APPEND_NAME_TO_SINGLE_LABEL_FIRST); + break; case 'M': (void) getdns_context_set_append_name(context, GETDNS_APPEND_NAME_ONLY_TO_MULTIPLE_LABEL_NAME_AFTER_FAILURE);