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

knsupdate: don't pre-set the zone to root

parent f4fe9816
No related branches found
No related tags found
1 merge request!1459Tiny knsupdate and ctl improvements
Pipeline #100119 passed
......@@ -93,12 +93,12 @@ address and port are set by the system automatically. The default port number
is 0.
.TP
\fBzone\fP \fIname\fP
Specifies that all updates are done within a zone \fIname\fP\&. If not specified,
the root zone (\fB\&.\fP) is considered.
Specifies that all updates are done within a zone \fIname\fP\&. The zone name doesn\(aqt
have a default and must be set explicitly.
.TP
\fBorigin\fP \fIname\fP
Specifies fully qualified domain name suffix which is appended to non\-fqd
owners in update commands. The default origin is the root zone.
owners in update commands. The default is the terminal label (\fB\&.\fP).
.TP
\fBclass\fP \fIname\fP
Sets \fIname\fP as the default class for all updates. If not used, the default
......
......@@ -70,12 +70,12 @@ Commands
is 0.
**zone** *name*
Specifies that all updates are done within a zone *name*. If not specified,
the root zone (**.**) is considered.
Specifies that all updates are done within a zone *name*. The zone name doesn't
have a default and must be set explicitly.
**origin** *name*
Specifies fully qualified domain name suffix which is appended to non-fqd
owners in update commands. The default origin is the root zone.
owners in update commands. The default is the terminal label (**.**).
**class** *name*
Sets *name* as the default class for all updates. If not used, the default
......
......@@ -810,6 +810,11 @@ int cmd_send(const char* lp, knsupdate_params_t *params)
DBG("%s: lp='%s'\n", __func__, lp);
DBG("sending packet\n");
if (params->zone == NULL) {
ERR("no zone specified\n");
return KNOT_EINVAL;
}
/* Build query packet. */
int ret = build_query(params);
if (ret != KNOT_EOK) {
......
......@@ -104,7 +104,6 @@ static int knsupdate_init(knsupdate_params_t *params)
params->class_num = KNOT_CLASS_IN;
params->retries = DEFAULT_RETRIES_NSUPDATE;
params->wait = DEFAULT_TIMEOUT_NSUPDATE;
params->zone = strdup(".");
/* Initialize RR parser. */
if (zs_init(&params->parser, ".", params->class_num, 3600) != 0 ||
......
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