Permalink
Browse files

mind04 discovered we count corrupt packets and EAGAIN situations as v…

…alidly received packets, skewing the udp questions/answers graphs on auth.
  • Loading branch information...
1 parent f06d069 commit 407867ca82a1cec2dbc89fc97d1cdac6940580b7 @ahupowerdns ahupowerdns committed with mind04 Dec 10, 2014
Showing with 4 additions and 5 deletions.
  1. +4 −5 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++;

0 comments on commit 407867c

Please sign in to comment.