]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
trust_anchors: make sure to stop tracking managed key when overriding it
authorTomas Krizek <tomas.krizek@nic.cz>
Mon, 18 Mar 2019 17:31:12 +0000 (18:31 +0100)
committerPetr Špaček <petr.spacek@nic.cz>
Thu, 4 Apr 2019 12:18:58 +0000 (14:18 +0200)
daemon/lua/trust_anchors.lua.in

index fd977d675addabb987bf107e0feaf6e429937ab2..fb032d5d0d716ce4b6fbd58cb6be9119fb3e2287 100644 (file)
@@ -348,8 +348,12 @@ local function add_file(path, unmanaged)
 
        local owner = keyset.owner
        local owner_str = kres.dname2str(owner)
-       if trust_anchors.keysets[owner] then
+       local keyset_orig = trust_anchors.keysets[owner]
+       if keyset_orig then
                warn('[ ta ] warning: overriding previously set trust anchors for ' .. owner_str)
+               if keyset_orig.managed then
+                       ta_update.stop(owner)
+               end
        end
        trust_anchors.keysets[owner] = keyset