mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 14:35:26 +00:00
2801. [func] Detect and report records that are different according
to DNSSEC but are sematically equal according to plain DNS. Apply plain DNS comparisons rather than DNSSEC comparisons when processing UPDATE requests. dnssec-signzone now removes such semantically duplicate records prior to signing the RRset. named-checkzone -r {ignore|warn|fail} (default warn) named-compilezone -r {ignore|warn|fail} (default warn) named.conf: check-dup-records {ignore|warn|fail};
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: rdata.c,v 1.203 2009/10/08 23:13:07 marka Exp $ */
|
||||
/* $Id: rdata.c,v 1.204 2009/12/04 21:09:33 marka Exp $ */
|
||||
|
||||
/*! \file */
|
||||
|
||||
@@ -349,6 +349,37 @@ dns_rdata_compare(const dns_rdata_t *rdata1, const dns_rdata_t *rdata2) {
|
||||
return (result);
|
||||
}
|
||||
|
||||
int
|
||||
dns_rdata_casecompare(const dns_rdata_t *rdata1, const dns_rdata_t *rdata2) {
|
||||
int result = 0;
|
||||
isc_boolean_t use_default = ISC_FALSE;
|
||||
|
||||
REQUIRE(rdata1 != NULL);
|
||||
REQUIRE(rdata2 != NULL);
|
||||
REQUIRE(rdata1->data != NULL);
|
||||
REQUIRE(rdata2->data != NULL);
|
||||
REQUIRE(DNS_RDATA_VALIDFLAGS(rdata1));
|
||||
REQUIRE(DNS_RDATA_VALIDFLAGS(rdata2));
|
||||
|
||||
if (rdata1->rdclass != rdata2->rdclass)
|
||||
return (rdata1->rdclass < rdata2->rdclass ? -1 : 1);
|
||||
|
||||
if (rdata1->type != rdata2->type)
|
||||
return (rdata1->type < rdata2->type ? -1 : 1);
|
||||
|
||||
CASECOMPARESWITCH
|
||||
|
||||
if (use_default) {
|
||||
isc_region_t r1;
|
||||
isc_region_t r2;
|
||||
|
||||
dns_rdata_toregion(rdata1, &r1);
|
||||
dns_rdata_toregion(rdata2, &r2);
|
||||
result = isc_region_compare(&r1, &r2);
|
||||
}
|
||||
return (result);
|
||||
}
|
||||
|
||||
/***
|
||||
*** Conversions
|
||||
***/
|
||||
|
Reference in New Issue
Block a user