mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 05:57:52 +00:00
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.
This commit is contained in:
parent
f59fd49fd8
commit
a9182c89a6
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user