Commit Diff
Diff:
d7a691508358b6ff6e748785292636154a24de80
e88dd88f93a6ac144f821b2609bfaa93571f0acd
Commit:
e88dd88f93a6ac144f821b2609bfaa93571f0acd
Tree:
44b2c5c86c0fe5efb18ef21c9fded785f1b526a9
Author:
pjp <pjp@delphinusdns.org>
Committer:
pjp <pjp@delphinusdns.org>
Date:
Fri Jan 22 13:54:38 2016 UTC
Message:
This makes the zone solarscale.de give the same NSEC3 replies to the query xxx-example.solarscale.de as nsd. Not tested further may need improvements.
blob - 3521c049b2bb61586e46a07b2aa8c89400688b34
blob + e082b2cf013e93dde1ae7e1c3267beeb8ae234ec
--- dnssec.c
+++ dnssec.c
@@ -203,16 +203,20 @@ find_next_closer_nsec3(char *zonename, int zonelen, ch
return NULL;
}
-#ifdef DEBUG
+#if DEBUG
dolog(LOG_INFO, "resolved at %s\n", n3->domainname);
#endif
if ((ns3p = TAILQ_PREV(n3, a, nsec3_entries)) != NULL) {
return (ns3p->domainname);
+ } else
+ return (n3->domainname);
+#if 0
} else {
ns3p = TAILQ_LAST(&dnp->nsec3head, a);
return (ns3p->domainname);
}
+#endif
/* NOTREACHED */
return (NULL);
@@ -620,6 +624,11 @@ find_next_closer(DB *db, char *name, int namelen)
p = name;
plen = namelen;
+
+ /* advance one label */
+ plen -= (*p + 1);
+ p = (p + (*p + 1));
+
do {
rs = get_record_size(db, p, plen);
repomaster@centroid.eu