1793. [func] Extend adjusting TTL warning messages. [RT #13378]

This commit is contained in:
Mark Andrews 2005-01-11 23:56:50 +00:00
parent 369ed36db5
commit f450814ab8
2 changed files with 17 additions and 4 deletions

View file

@ -8,7 +8,7 @@
1794. [func] Named and named-checkzone can now both check for
non-terminal wildcard records.
1793. [placeholder] rt13378
1793. [func] Extend adjusting TTL warning messages. [RT #13378]
1792. [func] New zone option "notify-delay". Specify a minimum
delay between sets of NOTIFY messages.

View file

@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: diff.c,v 1.9 2004/03/05 05:09:19 marka Exp $ */
/* $Id: diff.c,v 1.10 2005/01/11 23:56:50 marka Exp $ */
#include <config.h>
@ -30,8 +30,10 @@
#include <dns/db.h>
#include <dns/diff.h>
#include <dns/log.h>
#include <dns/rdataclass.h>
#include <dns/rdatalist.h>
#include <dns/rdataset.h>
#include <dns/rdatatype.h>
#include <dns/result.h>
#define CHECK(op) \
@ -195,6 +197,9 @@ diff_apply(dns_diff_t *diff, dns_db_t *db, dns_dbversion_t *ver,
dns_difftuple_t *t;
dns_dbnode_t *node = NULL;
isc_result_t result;
char namebuf[DNS_NAME_FORMATSIZE];
char typebuf[DNS_RDATATYPE_FORMATSIZE];
char classbuf[DNS_RDATACLASS_FORMATSIZE];
REQUIRE(DNS_DIFF_VALID(diff));
REQUIRE(DNS_DB_VALID(db));
@ -254,11 +259,19 @@ diff_apply(dns_diff_t *diff, dns_db_t *db, dns_dbversion_t *ver,
t->rdata.type == type &&
rdata_covers(&t->rdata) == covers)
{
dns_name_format(name, namebuf, sizeof(namebuf));
dns_rdatatype_format(t->rdata.type, typebuf,
sizeof(typebuf));
dns_rdataclass_format(t->rdata.rdclass,
classbuf,
sizeof(classbuf));
if (t->ttl != rdl.ttl && warn)
isc_log_write(DIFF_COMMON_LOGARGS,
ISC_LOG_WARNING,
"TTL differs in rdataset, "
"adjusting %lu -> %lu",
"'%s/%s/%s': TTL differs in "
"rdataset, adjusting "
"%lu -> %lu",
namebuf, typebuf, classbuf,
(unsigned long) t->ttl,
(unsigned long) rdl.ttl);
ISC_LIST_APPEND(rdl.rdata, &t->rdata, link);