Skip to content

Instantly share code, notes, and snippets.

diff --git a/pdns/pdns_recursor.cc b/pdns/pdns_recursor.cc
index 65a8baffe..d9e4f2113 100644
--- a/pdns/pdns_recursor.cc
+++ b/pdns/pdns_recursor.cc
@@ -186,7 +186,7 @@ static size_t s_maxUDPQueriesPerRound;
static uint64_t g_latencyStatSize;
static uint32_t g_disthashseed;
static unsigned int g_maxTCPPerClient;
-static unsigned int g_networkTimeoutMsec;
+unsigned int g_networkTimeoutMsec;
$ cat no-aa-option.patch
diff -ru pdns-recursor-4.2.0.orig/pdns_recursor.cc pdns-recursor-4.2.0/pdns_recursor.cc
--- pdns-recursor-4.2.0.orig/pdns_recursor.cc 2019-07-15 02:32:59.000000000 -0600
+++ pdns-recursor-4.2.0/pdns_recursor.cc 2019-08-01 07:30:57.003001804 -0600
@@ -3752,6 +3752,7 @@
SyncRes::s_maxtotusec=1000*::arg().asNum("max-total-msec");
SyncRes::s_maxdepth=::arg().asNum("max-recursion-depth");
SyncRes::s_rootNXTrust = ::arg().mustDo( "root-nx-trust");
+ SyncRes::s_relaxAA = ::arg().mustDo("relax-aa");
if(SyncRes::s_serverID.empty()) {
rmRule(0)
-- refresh existing NMG, and then set new rule
dropTest:clear()
for line in io.lines("/tmp/ips") do dropTest:addMask(line) end
addAction(NetmaskGroupRule(dropTest, true, true), DropAction())
topRule()
diff --git a/pdns/dnsdist-web.cc b/pdns/dnsdist-web.cc
index 07613f131..25021b745 100644
--- a/pdns/dnsdist-web.cc
+++ b/pdns/dnsdist-web.cc
@@ -531,6 +531,16 @@ static void connectionThread(int sock, ComboAddress remote)
output << statesbase << "tcpavgconnduration" << label << " " << state->tcpAvgConnectionDuration << "\n";
}
+ const string rulesbase = "dnsdist_rules";
+ auto localRules = g_rulactions.getLocal();