From: Wouter Wijngaards Date: Tue, 2 Apr 2019 14:28:36 +0000 (+0000) Subject: - Fix for auth zone nsec3 ent fix for wildcard nodata. X-Git-Tag: final-svn-state~31 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8a0de6b519422e38c727ad5b69cab0569f02446f;p=thirdparty%2Funbound.git - Fix for auth zone nsec3 ent fix for wildcard nodata. git-svn-id: file:///svn/unbound/trunk@5144 be551aaa-1e26-0410-a405-d3ace91eadb9 --- diff --git a/doc/Changelog b/doc/Changelog index 6740be1e8..cabc53970 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -3,6 +3,7 @@ match nsec3 records. - Fix for out of bounds integers, thanks to OSTIF audit. It is in allocation debug code. + - Fix for auth zone nsec3 ent fix for wildcard nodata. 25 March 2019: Wouter - Fix that tls-session-ticket-keys: "" on its own in unbound.conf diff --git a/services/authzone.c b/services/authzone.c index 9a8afd6ff..7d52b2aa6 100644 --- a/services/authzone.c +++ b/services/authzone.c @@ -2646,19 +2646,6 @@ az_nsec3_findnode(struct auth_zone* z, uint8_t* hashnm, size_t hashnmlen) return node; } -/** Find exact match (or NULL) */ -static struct auth_data* -az_nsec3_find_exact_match(struct auth_zone* z, uint8_t* nm, size_t nmlen, - int algo, size_t iter, uint8_t* salt, size_t saltlen) -{ - uint8_t hname[LDNS_MAX_DOMAINLEN]; - size_t hlen = sizeof(hname); - if(!az_nsec3_hashname(z, hname, &hlen, nm, nmlen, algo, iter, - salt, saltlen)) - return NULL; - return az_nsec3_findnode(z, hname, hlen); -} - /** Find cover for hashed(nm, nmlen) (or NULL) */ static struct auth_data* az_nsec3_find_cover(struct auth_zone* z, uint8_t* nm, size_t nmlen, @@ -2783,7 +2770,7 @@ az_add_nsec3_proof(struct auth_zone* z, struct regional* region, /* see if the node has a hash of itself for the nodata * proof nsec3, this has to be an exact match nsec3. */ struct auth_data* match; - match = az_nsec3_find_exact_match(z, qname, qname_len, algo, + match = az_nsec3_find_exact(z, qname, qname_len, algo, iter, salt, saltlen); if(match) { if(!az_nsec3_insert(z, region, msg, match))