From 8302d4cb1db346198ae9698f489b956abf0f0d32 Mon Sep 17 00:00:00 2001 From: phonedph1 Date: Mon, 10 Sep 2018 15:08:01 +0000 Subject: [PATCH] Be consistent with reload-zones and clear all caches on (N)TA changes. --- pdns/rec_channel_rec.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pdns/rec_channel_rec.cc b/pdns/rec_channel_rec.cc index 670b40e7b..eaa20cf91 100644 --- a/pdns/rec_channel_rec.cc +++ b/pdns/rec_channel_rec.cc @@ -462,7 +462,9 @@ string doAddNTA(T begin, T end) g_luaconfs.modify([who, why](LuaConfigItems& lci) { lci.negAnchors[who] = why; }); + broadcastAccFunction(boost::bind(pleaseWipeCache, who, true)); broadcastAccFunction(boost::bind(pleaseWipePacketCache, who, true)); + broadcastAccFunction(boost::bind(pleaseWipeAndCountNegCache, who, true)); return "Added Negative Trust Anchor for " + who.toLogString() + " with reason '" + why + "'\n"; } @@ -508,7 +510,9 @@ string doClearNTA(T begin, T end) g_luaconfs.modify([entry](LuaConfigItems& lci) { lci.negAnchors.erase(entry); }); + broadcastAccFunction(boost::bind(pleaseWipeCache, entry, true)); broadcastAccFunction(boost::bind(pleaseWipePacketCache, entry, true)); + broadcastAccFunction(boost::bind(pleaseWipeAndCountNegCache, entry, true)); if (!first) { first = false; removed += ","; @@ -563,7 +567,9 @@ string doAddTA(T begin, T end) auto ds = unique_ptr(dynamic_cast(DSRecordContent::make(what))); lci.dsAnchors[who].insert(*ds); }); + broadcastAccFunction(boost::bind(pleaseWipeCache, who, true)); broadcastAccFunction(boost::bind(pleaseWipePacketCache, who, true)); + broadcastAccFunction(boost::bind(pleaseWipeAndCountNegCache, who, true)); g_log<(boost::bind(pleaseWipeCache, entry, true)); broadcastAccFunction(boost::bind(pleaseWipePacketCache, entry, true)); + broadcastAccFunction(boost::bind(pleaseWipeAndCountNegCache, entry, true)); if (!first) { first = false; removed += ","; -- 2.40.0