]> granicus.if.org Git - pdns/commitdiff
mind04 discovered we count corrupt packets and EAGAIN situations as validly received...
authorbert hubert <bert.hubert@netherlabs.nl>
Wed, 10 Dec 2014 10:11:22 +0000 (11:11 +0100)
committerbert hubert <bert.hubert@netherlabs.nl>
Wed, 10 Dec 2014 10:11:22 +0000 (11:11 +0100)
pdns/common_startup.cc

index 7aedc1fb900ef1d08f6e3991202e618d70938fb3..d57b666c53a8782743e2c25e561ff5b0fabcf9e7 100644 (file)
@@ -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++;