Skip to content
Snippets Groups Projects
Commit ad4c50de authored by Jan Kadlec's avatar Jan Kadlec
Browse files

Added previously removed auth check.

- node->prev can contain both delegation points and authoritive nodes, so the check has to be present.
parent d1ac696b
No related branches found
No related tags found
1 merge request!217Node Cleanup
......@@ -285,6 +285,9 @@ static int ns_put_nsec_wildcard(const knot_zone_contents_t *zone,
if (previous == NULL) {
previous = knot_zone_contents_find_previous(zone, qname);
assert(previous != NULL);
while (previous->flags != NODE_FLAGS_AUTH) {
previous = previous->prev;
}
}
knot_rrset_t rrset = node_rrset(previous, KNOT_RRTYPE_NSEC);
......@@ -468,9 +471,11 @@ static int ns_put_nsec_nxdomain(const knot_dname_t *qname,
// check if we have previous; if not, find one using the tree
if (previous == NULL) {
/*! \todo Check version. */
previous = knot_zone_contents_find_previous(zone, qname);
assert(previous != NULL);
while (previous->flags != NODE_FLAGS_AUTH) {
previous = previous->prev;
}
}
dbg_ns_exec_verb(
......
......@@ -213,6 +213,9 @@ static int adjust_pointers(zone_node_t **tnode, void *data)
node->flags |= NODE_FLAGS_NONAUTH;
} else if (node_rrtype_exists(node, KNOT_RRTYPE_NS) && node != args->zone->apex) {
node->flags |= NODE_FLAGS_DELEG;
} else {
// Default.
node->flags = NODE_FLAGS_AUTH;
}
// set pointer to previous node
......
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