From: Ondřej Surý Date: Thu, 16 Jul 2020 15:30:44 +0000 (+0200) Subject: Change the dns_name hashing to use 32-bit values X-Git-Tag: v9.17.4~40^2~1 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=a9182c89a666a9aa772c770c7f9f9ea39b98f328;p=thirdparty%2Fbind9.git Change the dns_name hashing to use 32-bit values Change the dns_hash_name() and dns_hash_fullname() functions to use isc_hash32() as the maximum hashtable size in rbt is 0..UINT32_MAX large. --- diff --git a/lib/dns/name.c b/lib/dns/name.c index 6b904e1822f..46dee707818 100644 --- a/lib/dns/name.c +++ b/lib/dns/name.c @@ -465,7 +465,7 @@ dns_name_hash(const dns_name_t *name, bool case_sensitive) { } /* High bits are more random. */ - return (isc_hash_function(name->ndata, length, case_sensitive) >> 32); + return (isc_hash32(name->ndata, length, case_sensitive)); } unsigned int @@ -480,8 +480,7 @@ dns_name_fullhash(const dns_name_t *name, bool case_sensitive) { } /* High bits are more random. */ - return (isc_hash_function(name->ndata, name->length, case_sensitive) >> - 32); + return (isc_hash32(name->ndata, name->length, case_sensitive)); } dns_namereln_t