2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 14:35:26 +00:00

4831. [bug] Convert the RRSIG expirytime to 64 bits for

comparisions in diff.c:resign. [RT #46710]
This commit is contained in:
Mark Andrews
2017-11-29 15:20:23 +11:00
parent 3a12b43245
commit 0579a11658
2 changed files with 9 additions and 5 deletions

View File

@@ -1,3 +1,6 @@
4831. [bug] Convert the RRSIG expirytime to 64 bits for
comparisions in diff.c:resign. [RT #46710]
4830. [bug] Failure to configure ATF when requested did not cause
an error in top-level configure script. [RT #46655]

View File

@@ -30,6 +30,7 @@
#include <dns/rdatastruct.h>
#include <dns/rdatatype.h>
#include <dns/result.h>
#include <dns/time.h>
#define CHECK(op) \
do { result = (op); \
@@ -195,7 +196,7 @@ static isc_stdtime_t
setresign(dns_rdataset_t *modified) {
dns_rdata_t rdata = DNS_RDATA_INIT;
dns_rdata_rrsig_t sig;
isc_stdtime_t when;
isc_int64_t when;
isc_result_t result;
result = dns_rdataset_first(modified);
@@ -205,7 +206,7 @@ setresign(dns_rdataset_t *modified) {
if ((rdata.flags & DNS_RDATA_OFFLINE) != 0)
when = 0;
else
when = sig.timeexpire;
when = dns_time64_from32(sig.timeexpire);
dns_rdata_reset(&rdata);
result = dns_rdataset_next(modified);
@@ -215,14 +216,14 @@ setresign(dns_rdataset_t *modified) {
if ((rdata.flags & DNS_RDATA_OFFLINE) != 0) {
goto next_rr;
}
if (when == 0 || sig.timeexpire < when)
when = sig.timeexpire;
if (when == 0 || dns_time64_from32(sig.timeexpire) < when)
when = dns_time64_from32(sig.timeexpire);
next_rr:
dns_rdata_reset(&rdata);
result = dns_rdataset_next(modified);
}
INSIST(result == ISC_R_NOMORE);
return (when);
return ((isc_stdtime_t)when);
}
static void