mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 06:25:31 +00:00
[master] change hash function for RRL
4709. [cleanup] Use dns_name_fullhash() to hash names for RRL. [RT #45435]
This commit is contained in:
3
CHANGES
3
CHANGES
@@ -1,3 +1,6 @@
|
|||||||
|
4709. [cleanup] Use dns_name_fullhash() to hash names for RRL.
|
||||||
|
[RT #45435]
|
||||||
|
|
||||||
4708. [cleanup] Legacy Windows builds (i.e. for XP and earlier)
|
4708. [cleanup] Legacy Windows builds (i.e. for XP and earlier)
|
||||||
are no longer supported. [RT #45186]
|
are no longer supported. [RT #45186]
|
||||||
|
|
||||||
|
@@ -353,7 +353,11 @@ unsigned int
|
|||||||
dns_name_hashbylabel(const dns_name_t *name, isc_boolean_t case_sensitive);
|
dns_name_hashbylabel(const dns_name_t *name, isc_boolean_t case_sensitive);
|
||||||
/*%<
|
/*%<
|
||||||
* Provide a hash value for 'name', where the hash value is the sum
|
* Provide a hash value for 'name', where the hash value is the sum
|
||||||
* of the hash values of each label.
|
* of the hash values of each label. This function should only be used
|
||||||
|
* when incremental hashing is necessary, for example, during RBT
|
||||||
|
* traversal. It is not currently used in BIND. Generally,
|
||||||
|
* dns_name_fullhash() is the correct function to use for name
|
||||||
|
* hashing.
|
||||||
*
|
*
|
||||||
* Note: if 'case_sensitive' is ISC_FALSE, then names which differ only in
|
* Note: if 'case_sensitive' is ISC_FALSE, then names which differ only in
|
||||||
* case will have the same hash value.
|
* case will have the same hash value.
|
||||||
|
@@ -417,11 +417,11 @@ make_key(const dns_rrl_t *rrl, dns_rrl_key_t *key,
|
|||||||
{
|
{
|
||||||
dns_name_init(&base, base_offsets);
|
dns_name_init(&base, base_offsets);
|
||||||
dns_name_getlabelsequence(qname, 1, labels-1, &base);
|
dns_name_getlabelsequence(qname, 1, labels-1, &base);
|
||||||
key->s.qname_hash = dns_name_hashbylabel(&base,
|
key->s.qname_hash =
|
||||||
ISC_FALSE);
|
dns_name_fullhash(&base, ISC_FALSE);
|
||||||
} else {
|
} else {
|
||||||
key->s.qname_hash = dns_name_hashbylabel(qname,
|
key->s.qname_hash =
|
||||||
ISC_FALSE);
|
dns_name_fullhash(qname, ISC_FALSE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user