From 611500b7d4b0323c933b0863fa6696578efe8e75 Mon Sep 17 00:00:00 2001 From: Keith Coleman Date: Thu, 6 May 2021 04:33:16 -0400 Subject: [PATCH] plugin/dnssec: interface type correction for `periodicClean` sig validity check (#4608) Signed-off-by: Keith C --- plugin/dnssec/cache.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/plugin/dnssec/cache.go b/plugin/dnssec/cache.go index 4dfe48d0c..877f8ef52 100644 --- a/plugin/dnssec/cache.go +++ b/plugin/dnssec/cache.go @@ -33,9 +33,10 @@ func periodicClean(c *cache.Cache, stop <-chan struct{}) { // the signature is75 := time.Now().UTC().Add(sixDays) c.Walk(func(items map[uint64]interface{}, key uint64) bool { - sig := items[key].(*dns.RRSIG) - if !sig.ValidityPeriod(is75) { - delete(items, key) + for _, rr := range items[key].([]dns.RR) { + if !rr.(*dns.RRSIG).ValidityPeriod(is75) { + delete(items, key) + } } return true })