Commit a9182c89 authored by Ondřej Surý's avatar Ondřej Surý

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.
parent f59fd49f
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment