Skip to content
Snippets Groups Projects
Commit 6c588675 authored by Daniel Salzman's avatar Daniel Salzman
Browse files

utils: remove +[no]fail (kdig) and -s (khost) options

parent dd5aba62
No related branches found
No related tags found
1 merge request!439utils: remove +[no]fail (kdig) and -s (khost) options
......@@ -194,9 +194,6 @@ Show the TTL value.
\fB+\fP[\fBno\fP]\fBtcp\fP
Use the TCP protocol (default is UDP for standard query and TCP for AXFR/IXFR).
.TP
\fB+\fP[\fBno\fP]\fBfail\fP
Stop querying next nameserver if SERVFAIL response is received.
.TP
\fB+\fP[\fBno\fP]\fBignore\fP
Don\(aqt use TCP automatically if a truncated reply is received.
.TP
......@@ -241,6 +238,7 @@ Options \fB\-f\fP and \fB\-m\fP and query options:
\fB+ndots\fP=\fID\fP,
\fB+domain\fP=\fIsomename\fP,
\fB+trusted\-key\fP=\fI####\fP,
\fB+\fP[\fBno\fP]\fBfail\fP,
\fB+\fP[\fBno\fP]\fBvc\fP,
\fB+\fP[\fBno\fP]\fBsearch\fP,
\fB+\fP[\fBno\fP]\fBshowsearch\fP,
......
......@@ -73,9 +73,6 @@ Print help and usage.
\fB\-r\fP
Disable recursion.
.TP
\fB\-s\fP
Stop querying the next nameserver if SERVFAIL response is received
.TP
\fB\-T\fP
Use the TCP protocol.
.TP
......@@ -107,7 +104,7 @@ try. The default is 2 seconds.
Missing features with regard to ISC dig:
.INDENT 0.0
.INDENT 3.5
Options \fB\-C\fP, \fB\-i\fP, \fB\-l\fP, \fB\-m\fP and \fB\-N\fP\&.
Options \fB\-C\fP, \fB\-i\fP, \fB\-l\fP, \fB\-m\fP, \fB\-N\fP and \fB\-s\fP\&.
.UNINDENT
.UNINDENT
.sp
......
......@@ -171,9 +171,6 @@ Options
**+**\ [\ **no**\ ]\ **tcp**
Use the TCP protocol (default is UDP for standard query and TCP for AXFR/IXFR).
**+**\ [\ **no**\ ]\ **fail**
Stop querying next nameserver if SERVFAIL response is received.
**+**\ [\ **no**\ ]\ **ignore**
Don't use TCP automatically if a truncated reply is received.
......@@ -218,6 +215,7 @@ Missing features with regard to ISC dig:
**+ndots**\ =\ *D*,
**+domain**\ =\ *somename*,
**+trusted-key**\ =\ *####*,
**+**\ [\ **no**\ ]\ **fail**,
**+**\ [\ **no**\ ]\ **vc**,
**+**\ [\ **no**\ ]\ **search**,
**+**\ [\ **no**\ ]\ **showsearch**,
......
......@@ -50,9 +50,6 @@ Options
**-r**
Disable recursion.
**-s**
Stop querying the next nameserver if SERVFAIL response is received
**-T**
Use the TCP protocol.
......@@ -84,7 +81,7 @@ Notes
Missing features with regard to ISC dig:
Options **-C**, **-i**, **-l**, **-m** and **-N**.
Options **-C**, **-i**, **-l**, **-m**, **-N** and **-s**.
Differences with regard to ISC host:
......
......@@ -624,11 +624,6 @@ static int process_query_packet(const knot_pkt_t *query,
knot_pkt_free(&reply);
net_close(net);
// Check for SERVFAIL.
if (knot_wire_get_rcode(in) == KNOT_RCODE_SERVFAIL) {
return 1;
}
return 0;
}
......@@ -707,12 +702,6 @@ static void process_query(const query_t *query)
sign_context_deinit(&sign_ctx);
knot_pkt_free(&out_packet);
return;
// SERVFAIL.
} else if (ret == 1 && query->servfail_stop == true) {
net_clean(&net);
sign_context_deinit(&sign_ctx);
knot_pkt_free(&out_packet);
return;
}
if (i < query->retries) {
......
......@@ -508,24 +508,6 @@ static int opt_notcp(const char *arg, void *query)
return KNOT_EOK;
}
static int opt_fail(const char *arg, void *query)
{
query_t *q = query;
q->servfail_stop = true;
return KNOT_EOK;
}
static int opt_nofail(const char *arg, void *query)
{
query_t *q = query;
q->servfail_stop = false;
return KNOT_EOK;
}
static int opt_ignore(const char *arg, void *query)
{
query_t *q = query;
......@@ -802,9 +784,6 @@ static const param_t kdig_opts2[] = {
{ "tcp", ARG_NONE, opt_tcp },
{ "notcp", ARG_NONE, opt_notcp },
{ "fail", ARG_NONE, opt_fail },
{ "nofail", ARG_NONE, opt_nofail },
{ "ignore", ARG_NONE, opt_ignore },
{ "noignore", ARG_NONE, opt_noignore },
......@@ -863,7 +842,6 @@ query_t* query_create(const char *owner, const query_t *conf)
query->retries = DEFAULT_RETRIES_DIG;
query->wait = DEFAULT_TIMEOUT_DIG;
query->ignore_tc = false;
query->servfail_stop = true;
query->class_num = -1;
query->type_num = -1;
query->serial = -1;
......@@ -899,7 +877,6 @@ query_t* query_create(const char *owner, const query_t *conf)
query->retries = conf->retries;
query->wait = conf->wait;
query->ignore_tc = conf->ignore_tc;
query->servfail_stop = conf->servfail_stop;
query->class_num = conf->class_num;
query->type_num = conf->type_num;
query->serial = conf->serial;
......@@ -1381,7 +1358,6 @@ static void kdig_help(void)
" +[no]class Show DNS class.\n"
" +[no]ttl Show TTL value.\n"
" +[no]tcp Use TCP protocol.\n"
" +[no]fail Stop if SERVFAIL.\n"
" +[no]ignore Don't use TCP automatically if truncated.\n"
" +[no]nsid Request NSID.\n"
" +[no]edns=N Use EDNS (=version).\n"
......
......@@ -114,8 +114,6 @@ struct query {
int32_t wait;
/*!< Ignore truncated response. */
bool ignore_tc;
/*!< Stop querying if servfail. */
bool servfail_stop;
/*!< Class number (16unsigned + -1 uninitialized). */
int32_t class_num;
/*!< Type number (16unsigned + -1 uninitialized). */
......
......@@ -69,7 +69,6 @@ static int khost_init(kdig_params_t *params)
params->config->port = strdup(DEFAULT_DNS_PORT);
params->config->retries = DEFAULT_RETRIES_HOST;
params->config->wait = DEFAULT_TIMEOUT_HOST;
params->config->servfail_stop = false;
params->config->class_num = KNOT_CLASS_IN;
params->config->style = DEFAULT_STYLE_HOST;
params->config->idn = true;
......@@ -202,7 +201,6 @@ static void khost_help(void)
" -d Allow debug messages.\n"
" -h, --help Print help.\n"
" -r Disable recursion.\n"
" -s Stop if SERVFAIL.\n"
" -T Use TCP procotol.\n"
" -v Verbose output.\n"
" -V, --version Print program version.\n"
......@@ -273,9 +271,6 @@ int khost_parse(kdig_params_t *params, int argc, char *argv[])
case 'r':
conf->flags.rd_flag = false;
break;
case 's':
conf->servfail_stop = true;
break;
case 'T':
conf->protocol = PROTO_TCP;
break;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment