]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
modules/detect_time_skew: avoid cached `NS .`
authorVladimír Čunát <vladimir.cunat@nic.cz>
Fri, 8 Oct 2021 07:40:26 +0000 (09:40 +0200)
committerVladimír Čunát <vladimir.cunat@nic.cz>
Fri, 8 Oct 2021 07:40:26 +0000 (09:40 +0200)
Cache is persistent (in principle) and it might not have accurate data
for whatever reason.  Let's not bring caching complications into this.
It's cheap: just a single query to root server(s) on resolver start.

modules/detect_time_skew/detect_time_skew.lua

index 6eb2ab0e5f1674579462817d3631cffd3d59185f..346d48322f75e854878248ef0befe30fb021e6e4 100644 (file)
@@ -59,9 +59,9 @@ local function check_time_callback(pkt, req)
        end
 end
 
--- Make priming query and check time validty of RRSIGs.
+-- Do uncached priming query and check time validty of RRSIGs.
 local function check_time()
-       resolve(".", kres.type.NS, kres.class.IN, {"DNSSEC_WANT", "DNSSEC_CD"},
+       resolve(".", kres.type.NS, kres.class.IN, {"DNSSEC_WANT", "DNSSEC_CD", "NO_CACHE"},
                 check_time_callback)
 end