2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 05:57:52 +00:00

When an rdataset is signed, its ttl is normalized based on the signature

validity period.
This commit is contained in:
Brian Wellington 2000-05-31 22:01:39 +00:00
parent 5416faa397
commit 75f6c57d95
3 changed files with 25 additions and 4 deletions

View File

@ -1,3 +1,6 @@
218. [func] When an rdataset is signed, its ttl is normalized
based on the signature validity period.
217. [func] Also-notify and trusted-keys can now be used in a
config file.

View File

@ -2448,14 +2448,19 @@ cache_name(fetchctx_t *fctx, dns_name_t *name, isc_stdtime_t now) {
}
}
/*
* Normalize the rdataset and sigrdataset TTLs.
*/
if (sigrdataset != NULL) {
rdataset->ttl = ISC_MIN(rdataset->ttl,
sigrdataset->ttl);
sigrdataset->ttl = rdataset->ttl;
}
/*
* Cache this rdataset/sigrdataset pair as
* pending data.
*/
#ifdef notyet
if (sigrdataset != NULL)
set_ttl(rdataset, sigrdataset);
#endif
rdataset->trust = dns_trust_pending;
if (sigrdataset != NULL)
sigrdataset->trust = dns_trust_pending;

View File

@ -864,6 +864,19 @@ validate(dns_validator_t *val, isc_boolean_t resume) {
if (result != ISC_R_SUCCESS)
validator_log(val, ISC_LOG_DEBUG(3),
"failed to verify rdataset");
else {
isc_uint32_t ttl;
isc_stdtime_t now;
isc_stdtime_get(&now);
ttl = ISC_MIN(event->rdataset->ttl,
val->siginfo->timeexpire - now);
if (val->keyset != NULL)
ttl = ISC_MIN(ttl, val->keyset->ttl);
event->rdataset->ttl = ttl;
event->sigrdataset->ttl = ttl;
}
if (val->keynode != NULL)
dns_keytable_detachkeynode(val->keytable,
&val->keynode);