mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 14:07:59 +00:00
Log what change generated a 'not exact' error
This commit is contained in:
@@ -240,6 +240,22 @@ setownercase(dns_rdataset_t *rdataset, const dns_name_t *name) {
|
||||
}
|
||||
}
|
||||
|
||||
static const char *
|
||||
optotext(dns_diffop_t op) {
|
||||
switch (op) {
|
||||
case DNS_DIFFOP_ADD:
|
||||
return ("add");
|
||||
case DNS_DIFFOP_ADDRESIGN:
|
||||
return ("add-resign");
|
||||
case DNS_DIFFOP_DEL:
|
||||
return ("del");
|
||||
case DNS_DIFFOP_DELRESIGN:
|
||||
return ("del-resign");
|
||||
default:
|
||||
return ("unknown");
|
||||
}
|
||||
}
|
||||
|
||||
static isc_result_t
|
||||
diff_apply(dns_diff_t *diff, dns_db_t *db, dns_dbversion_t *ver, bool warn) {
|
||||
dns_difftuple_t *t;
|
||||
@@ -269,6 +285,7 @@ diff_apply(dns_diff_t *diff, dns_db_t *db, dns_dbversion_t *ver, bool warn) {
|
||||
|
||||
while (t != NULL && dns_name_equal(&t->name, name)) {
|
||||
dns_rdatatype_t type, covers;
|
||||
dns_rdataclass_t rdclass;
|
||||
dns_diffop_t op;
|
||||
dns_rdatalist_t rdl;
|
||||
dns_rdataset_t rds;
|
||||
@@ -277,6 +294,7 @@ diff_apply(dns_diff_t *diff, dns_db_t *db, dns_dbversion_t *ver, bool warn) {
|
||||
|
||||
op = t->op;
|
||||
type = t->rdata.type;
|
||||
rdclass = t->rdata.rdclass;
|
||||
covers = rdata_covers(&t->rdata);
|
||||
|
||||
/*
|
||||
@@ -439,6 +457,22 @@ diff_apply(dns_diff_t *diff, dns_db_t *db, dns_dbversion_t *ver, bool warn) {
|
||||
dns_rdataset_disassociate(&ardataset);
|
||||
}
|
||||
} else {
|
||||
if (result == DNS_R_NOTEXACT) {
|
||||
dns_name_format(name, namebuf,
|
||||
sizeof(namebuf));
|
||||
dns_rdatatype_format(type, typebuf,
|
||||
sizeof(typebuf));
|
||||
dns_rdataclass_format(rdclass, classbuf,
|
||||
sizeof(classbuf));
|
||||
isc_log_write(
|
||||
DIFF_COMMON_LOGARGS,
|
||||
ISC_LOG_ERROR,
|
||||
"dns_diff_apply: %s/%s/%s: %s "
|
||||
"%s",
|
||||
namebuf, typebuf, classbuf,
|
||||
optotext(op),
|
||||
isc_result_totext(result));
|
||||
}
|
||||
if (dns_rdataset_isassociated(&ardataset)) {
|
||||
dns_rdataset_disassociate(&ardataset);
|
||||
}
|
||||
|
Reference in New Issue
Block a user