2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-29 13:38:26 +00:00

SIGs covering different types are now considered separate rdatasets in dns_diff_apply()

This commit is contained in:
Andreas Gustafsson 1999-09-09 08:26:17 +00:00
parent a156e03d99
commit 93bcd26bfa

View File

@ -80,6 +80,12 @@ encode_uint32(isc_uint32_t val, unsigned char *p) {
p[3] = val >> 0;
}
static dns_rdatatype_t
rdata_covers(dns_rdata_t *rdata) {
return (rdata->type == dns_rdatatype_sig ?
dns_rdata_covers(rdata) : 0);
}
isc_uint32_t
dns_soa_getserial(dns_rdata_t *rdata)
{
@ -360,13 +366,14 @@ dns_diff_apply(dns_diff_t *diff, dns_db_t *db, dns_dbversion_t *ver)
CHECK(dns_db_findnode(db, name, ISC_TRUE, &node));
while (t != NULL && dns_name_equal(&t->name, name)) {
dns_rdatatype_t type;
dns_rdatatype_t type, covers;
dns_diffop_t op;
dns_rdatalist_t rdl;
dns_rdataset_t rds;
op = t->op;
type = t->rdata.type;
covers = rdata_covers(&t->rdata);
/*
* Collect a contiguous set of updates with
@ -383,15 +390,18 @@ dns_diff_apply(dns_diff_t *diff, dns_db_t *db, dns_dbversion_t *ver)
* of the diff itself is not affected.
*/
rdl.type = t->rdata.type;
rdl.covers = 0; /* XXX */
rdl.type = type;
rdl.covers = covers;
rdl.rdclass = t->rdata.rdclass;
rdl.ttl = t->ttl;
ISC_LIST_INIT(rdl.rdata);
ISC_LINK_INIT(&rdl, link);
while (t != NULL && dns_name_equal(&t->name, name) &&
t->op == op && t->rdata.type == type)
while (t != NULL &&
dns_name_equal(&t->name, name) &&
t->op == op &&
t->rdata.type == type &&
rdata_covers(&t->rdata) == covers)
{
if (t->ttl != rdl.ttl) {
printf("TTL differs in rdataset, "