[v9_6] check for physical equivalence in names
3599. [tuning] Check for pointer equivalence in name comparisons. [RT #18125] (cherry picked from commit7c2f548141) (cherry picked from commit9c971268d4)
This commit is contained in:
3
CHANGES
3
CHANGES
@@ -1,3 +1,6 @@
|
||||
3599. [tuning] Check for pointer equivalence in name comparisons.
|
||||
[RT #18125]
|
||||
|
||||
3594. [maint] Update config.guess and config.sub. [RT #33816]
|
||||
|
||||
3592. [doc] Moved documentation of rndc command options to the
|
||||
|
||||
@@ -577,6 +577,11 @@ dns_name_fullcompare(const dns_name_t *name1, const dns_name_t *name2,
|
||||
REQUIRE((name1->attributes & DNS_NAMEATTR_ABSOLUTE) ==
|
||||
(name2->attributes & DNS_NAMEATTR_ABSOLUTE));
|
||||
|
||||
if (name1 == name2) {
|
||||
*orderp = 0;
|
||||
return (dns_namereln_equal);
|
||||
}
|
||||
|
||||
SETUP_OFFSETS(name1, offsets1, odata1);
|
||||
SETUP_OFFSETS(name2, offsets2, odata2);
|
||||
|
||||
@@ -690,6 +695,9 @@ dns_name_equal(const dns_name_t *name1, const dns_name_t *name2) {
|
||||
REQUIRE((name1->attributes & DNS_NAMEATTR_ABSOLUTE) ==
|
||||
(name2->attributes & DNS_NAMEATTR_ABSOLUTE));
|
||||
|
||||
if (name1 == name2)
|
||||
return (ISC_TRUE);
|
||||
|
||||
if (name1->length != name2->length)
|
||||
return (ISC_FALSE);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user