Skip to content

Instantly share code, notes, and snippets.

@Habbie
Created April 26, 2013 11:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Habbie/5466820 to your computer and use it in GitHub Desktop.
Save Habbie/5466820 to your computer and use it in GitHub Desktop.
Index: pdns/syncres.hh
===================================================================
--- pdns/syncres.hh (Revision 2905)
+++ pdns/syncres.hh (Arbeitskopie)
@@ -460,6 +460,7 @@
uint64_t answers0_1, answers1_10, answers10_100, answers100_1000, answersSlow;
uint64_t avgLatencyUsec;
uint64_t qcounter;
+ uint64_t ipv6qcounter;
uint64_t tcpqcounter;
uint64_t unauthorizedUDP;
uint64_t unauthorizedTCP;
Index: pdns/docs/pdns.xml
===================================================================
--- pdns/docs/pdns.xml (Revision 2905)
+++ pdns/docs/pdns.xml (Arbeitskopie)
@@ -12999,6 +12999,7 @@
packetcache-misses Packet cache misses (since 3.2)
qa-latency shows the current latency average, in microseconds
questions counts all End-user initiated queries with the RD bit set
+ipv6-questions counts all End-user initiated queries with the RD bit set, received over IPv6 UDP
resource-limits counts number of queries that could not be performed because of resource limits
server-parse-errors counts number of server replied packets that could not be parsed
servfail-answers counts the number of times it answered SERVFAIL since starting
Index: pdns/pdns_recursor.cc
===================================================================
--- pdns/pdns_recursor.cc (Revision 2905)
+++ pdns/pdns_recursor.cc (Arbeitskopie)
@@ -816,6 +816,8 @@
string* doProcessUDPQuestion(const std::string& question, const ComboAddress& fromaddr, int fd)
{
++g_stats.qcounter;
+ if(fromaddr.sin4.sin_family==AF_INET6)
+ g_stats.ipv6qcounter++;
string response;
try {
Index: pdns/rec_channel_rec.cc
===================================================================
--- pdns/rec_channel_rec.cc (Revision 2905)
+++ pdns/rec_channel_rec.cc (Arbeitskopie)
@@ -402,6 +402,7 @@
RecursorControlParser::RecursorControlParser()
{
addGetStat("questions", &g_stats.qcounter);
+ addGetStat("ipv6questions", &g_stats.ipv6qcounter);
addGetStat("tcp-questions", &g_stats.tcpqcounter);
addGetStat("cache-hits", doGetCacheHits);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment