Skip to content

Instantly share code, notes, and snippets.

View gist:6576f3ad80203c2d9b113208da081481
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();
View gist:298aa335c8c598d9ebe684c397aa1fcc
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()
View gist:461ede8caa39acfee4d3d76afaac6715
$ 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()) {
View gist:489f318243f3ec832b12f72ad77c032d
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;