Skip to content
Snippets Groups Projects
Commit 8b30189b authored by Lubos Slovak's avatar Lubos Slovak
Browse files

Moved loading NSEC3PARAM back to zone adjusting.

It should be called always when adjusting is called (i.e. always
when new zone contents are created).
parent 80e243a5
Branches
Tags
No related merge requests found
......@@ -681,16 +681,6 @@ knot_zone_t *knot_zload_load(zloader_t *loader)
return NULL;
}
ret = knot_zone_contents_load_nsec3param(c->current_zone);
if (ret != KNOT_EOK) {
log_zone_error("Failed to load NSEC3 params: %s\n",
knot_strerror(ret));
rrset_list_delete(&c->node_rrsigs);
knot_zone_t *zone_to_free = c->current_zone->zone;
knot_zone_deep_free(&zone_to_free);
return NULL;
}
ret = knot_zone_connect_nsec_nodes(c->current_zone);
if (ret != KNOT_EOK) {
log_zone_error("Failed to connect regular and NSEC3 nodes: %s\n",
......
......@@ -53,6 +53,10 @@ int knot_zone_create_nsec_chain(const knot_zone_contents_t *zone,
* \param zone Zone for which the operation is performed.
*
* \return Error code, KNOT_EOK if successful.
*
* \todo IMPORTANT: this is called always when zone adjusting is. IMHO it can
* be moved back into zone adjusting as before commit bb795a4. This only
* leads to confusion and duplication of code.
*/
int knot_zone_connect_nsec_nodes(knot_zone_contents_t *zone);
......
......@@ -1474,6 +1474,13 @@ int knot_zone_contents_adjust(knot_zone_contents_t *zone,
if (zone == NULL)
return KNOT_EINVAL;
int result = knot_zone_contents_load_nsec3param(zone);
if (result != KNOT_EOK) {
log_zone_error("Failed to load NSEC3 params: %s\n",
knot_strerror(result));
return result;
}
// adjusting parameters
hattrie_t *lookup_tree = NULL;
......@@ -1487,8 +1494,6 @@ int knot_zone_contents_adjust(knot_zone_contents_t *zone,
adjust_arg.zone = zone;
adjust_arg.lookup_tree = lookup_tree;
int result;
// adjust NSEC3 nodes
result = knot_zone_contents_adjust_nodes(zone->nsec3_nodes, &adjust_arg,
......
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