From: bert hubert Date: Wed, 10 Dec 2014 10:11:22 +0000 (+0100) Subject: mind04 discovered we count corrupt packets and EAGAIN situations as validly received... X-Git-Tag: rec-3.7.0-rc1~123^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fe1727930fd5f4733921e5b2a5b55c0c58496b71;p=pdns mind04 discovered we count corrupt packets and EAGAIN situations as validly received packets, skewing the udp questions/answers graphs on auth. --- diff --git a/pdns/common_startup.cc b/pdns/common_startup.cc index 7aedc1fb9..d57b666c5 100644 --- a/pdns/common_startup.cc +++ b/pdns/common_startup.cc @@ -256,10 +256,8 @@ void declareStats(void) S.declareRing("remotes","Remote server IP addresses"); S.declareRing("remotes-unauth","Remote hosts querying domains for which we are not auth"); S.declareRing("remotes-corrupt","Remote hosts sending corrupt packets"); - } - int isGuarded(char **argv) { char *p=strstr(argv[0],"-instance"); @@ -315,14 +313,15 @@ void *qthread(void *number) } for(;;) { + if(!(P=NS->receive(&question))) { // receive a packet inline + continue; // packet was broken, try again + } + if (skipfirst) skipfirst=false; else numreceived++; - if(!(P=NS->receive(&question))) { // receive a packet inline - continue; // packet was broken, try again - } if(P->d_remote.getSocklen()==sizeof(sockaddr_in)) numreceived4++;