mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 22:15:20 +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:
@@ -465,7 +465,7 @@ dns_name_hash(const dns_name_t *name, bool case_sensitive) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* High bits are more random. */
|
/* 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
|
unsigned int
|
||||||
@@ -480,8 +480,7 @@ dns_name_fullhash(const dns_name_t *name, bool case_sensitive) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* High bits are more random. */
|
/* High bits are more random. */
|
||||||
return (isc_hash_function(name->ndata, name->length, case_sensitive) >>
|
return (isc_hash32(name->ndata, name->length, case_sensitive));
|
||||||
32);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
dns_namereln_t
|
dns_namereln_t
|
||||||
|
Reference in New Issue
Block a user