From: Tomas Krizek Date: Mon, 18 Mar 2019 17:31:12 +0000 (+0100) Subject: trust_anchors: make sure to stop tracking managed key when overriding it X-Git-Tag: v4.0.0~15^2~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e2abf7fa15c33f4c24f7c158f4bcc75b59cf466a;p=thirdparty%2Fknot-resolver.git trust_anchors: make sure to stop tracking managed key when overriding it --- diff --git a/daemon/lua/trust_anchors.lua.in b/daemon/lua/trust_anchors.lua.in index fd977d675..fb032d5d0 100644 --- a/daemon/lua/trust_anchors.lua.in +++ b/daemon/lua/trust_anchors.lua.in @@ -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