Skip to content
Snippets Groups Projects
Commit 568ce67c authored by Jan Včelák's avatar Jan Včelák :rocket:
Browse files

NSEC proofs: fix skipping of non-authoritative nodes

If a node to be included into an NSEC proof was establishing
a delegation, it was incorrectly skipped in the lookup.

close #415
parent 3f6deaf6
No related branches found
No related tags found
1 merge request!428NSEC: fix skipping of non-authoritative nodes
......@@ -302,7 +302,7 @@ static int ns_put_nsec_wildcard(const zone_contents_t *zone,
previous = zone_contents_find_previous(zone, qname);
assert(previous != NULL);
while (previous->flags != NODE_FLAGS_AUTH) {
while (previous->flags & NODE_FLAGS_NONAUTH) {
previous = previous->prev;
}
}
......@@ -490,7 +490,7 @@ static int ns_put_nsec_nxdomain(const knot_dname_t *qname,
if (previous == NULL) {
previous = zone_contents_find_previous(zone, qname);
assert(previous != NULL);
while (previous->flags != NODE_FLAGS_AUTH) {
while (previous->flags & NODE_FLAGS_NONAUTH) {
previous = previous->prev;
}
}
......@@ -529,7 +529,7 @@ dbg_ns_exec_verb(
}
const zone_node_t *prev_new = zone_contents_find_previous(zone, wildcard);
while (prev_new->flags != NODE_FLAGS_AUTH) {
while (prev_new->flags & NODE_FLAGS_NONAUTH) {
prev_new = prev_new->prev;
}
......
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