aboutsummaryrefslogtreecommitdiff
path: root/plugin
diff options
context:
space:
mode:
authorGravatar Keith Coleman <keith@fraudmarc.com> 2021-05-06 04:33:16 -0400
committerGravatar GitHub <noreply@github.com> 2021-05-06 10:33:16 +0200
commit611500b7d4b0323c933b0863fa6696578efe8e75 (patch)
treeb40280913f8af5defc4e09779c1f74fba0ec224d /plugin
parent8487111871b7fe61f139205d41403d30155400ce (diff)
downloadcoredns-611500b7d4b0323c933b0863fa6696578efe8e75.tar.gz
coredns-611500b7d4b0323c933b0863fa6696578efe8e75.tar.zst
coredns-611500b7d4b0323c933b0863fa6696578efe8e75.zip
plugin/dnssec: interface type correction for `periodicClean` sig validity check (#4608)
Signed-off-by: Keith C <keith@fraudmarc.com>
Diffstat (limited to 'plugin')
-rw-r--r--plugin/dnssec/cache.go7
1 files 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
})