[Opendnssec-commits] [svn.opendnssec.org/svn/dnssec] r6044 - branches/OpenDNSSEC-enforcer-ng/enforcer-ng/src/enforcer

yuri at NLnetLabs.nl yuri at NLnetLabs.nl
Mon Jan 9 15:52:18 CET 2012


Author: yuri
Date: 2012-01-09 15:52:18 +0100 (Mon, 09 Jan 2012)
New Revision: 6044

Modified:
   branches/OpenDNSSEC-enforcer-ng/enforcer-ng/src/enforcer/enforcer.cpp
Log:
catch case where negative caching is longer than positive caching.


Modified: branches/OpenDNSSEC-enforcer-ng/enforcer-ng/src/enforcer/enforcer.cpp
===================================================================
--- branches/OpenDNSSEC-enforcer-ng/enforcer-ng/src/enforcer/enforcer.cpp	2012-01-09 14:23:53 UTC (rev 6043)
+++ branches/OpenDNSSEC-enforcer-ng/enforcer-ng/src/enforcer/enforcer.cpp	2012-01-09 14:52:18 UTC (rev 6044)
@@ -492,7 +492,8 @@
 			break;
 		case RS:
 			endDate = zone.ttlEnddateRs();
-			recordTTL = policy->zone().max_zone_ttl();
+			recordTTL = max(policy->signatures().valdenial(), 
+							policy->zone().max_zone_ttl());
 			break;				  
 		default: 
 			ods_fatal_exit("[%s] %s Unknown record type (%d), "
@@ -551,7 +552,9 @@
 	if (zone.ttlEnddateDk() <= now)
 		zone.setTtlEnddateDk(addtime(now, policy->keys().ttl()));
 	if (zone.ttlEnddateRs() <= now)
-		zone.setTtlEnddateRs(addtime(now, policy->zone().max_zone_ttl())); 
+		zone.setTtlEnddateRs(addtime(now, 
+				max(policy->signatures().valdenial(), 
+					policy->zone().max_zone_ttl()))); 
 
 	/** Keep looping till there are no state changes.
 	 * Find the earliest update time */




More information about the Opendnssec-commits mailing list