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

Reverted wrong fix (4c4815e8).

refs #4
parent 8b30189b
Branches
Tags
No related merge requests found
......@@ -37,6 +37,10 @@
/*!
* \brief Length of raw NSEC3 hash in bytes.
*
* \todo May change later, when other hash algorithms are allowed, thus
* not good as a constant. That's why there's 'hash length' field in
* NSEC3 RDATA.
*/
#define KNOT_NSEC3_HASH_LENGTH 20
......
......@@ -485,8 +485,7 @@ static knot_node_t *create_nsec3_node(knot_dname_t *owner,
return NULL;
knot_rrset_t *nsec3_rrset;
knot_dname_t *rrowner = knot_dname_copy(rrowner);
nsec3_rrset = create_nsec3_rrset(rrowner, nsec3_params, rr_types, ttl);
nsec3_rrset = create_nsec3_rrset(owner, nsec3_params, rr_types, ttl);
if (!nsec3_rrset) {
knot_node_free(&new_node);
return NULL;
......@@ -503,6 +502,9 @@ static knot_node_t *create_nsec3_node(knot_dname_t *owner,
/*!
* \brief Get position of hash field in NSEC3 rdata.
*
* \todo Redundant - usage should be replaced by
* knot_rrset_rdata_nsec3_next_hashed().
*/
static uint8_t *nsec3_rdata_hash(uint8_t *rdata)
{
......@@ -770,10 +772,11 @@ int knot_zone_create_nsec_chain(const knot_zone_contents_t *zone,
int result;
if (is_nsec3_enabled(zone))
if (is_nsec3_enabled(zone)) {
result = create_nsec3_chain(zone, nsec_ttl, changeset);
else
} else {
result = create_nsec_chain(zone, nsec_ttl, changeset);
}
return result;
}
......
......@@ -79,8 +79,11 @@ knot_node_t *knot_node_new(const knot_dname_t *owner, knot_node_t *parent,
return NULL;
}
/* This is a subject to refactoring. Since owner is both at the RRSet
* and node, we need to decide which should have it. Not both. */
/*! \todo This is inconsistent: knot_rrset_new() does not copy owner.
* Either copy in all _new() functions, or in none. I vote for
* the former, as it should be responsibility of the caller to
* do the copying (or not if he decides to do so).
*/
if (owner) {
ret->owner = knot_dname_copy(owner);
}
......
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