]> granicus.if.org Git - pdns/commitdiff
DNSName: fix dnsdemog
authorPieter Lexis <pieter.lexis@powerdns.com>
Tue, 14 Jul 2015 08:55:15 +0000 (10:55 +0200)
committerPieter Lexis <pieter.lexis@powerdns.com>
Wed, 15 Jul 2015 14:49:16 +0000 (16:49 +0200)
pdns/dnsdemog.cc

index e5b72d02bc4e732d284af349d9da98a936c0b920..e5d5f92315f2010bc4831a0afadf328c25b3524c 100644 (file)
@@ -55,18 +55,9 @@ try
           entry.port = pr.d_udp->uh_sport;
           entry.id=dh->id;
 
-          //          ecount[entry]++;
-          string::size_type pos = 0;
-          for(pos = 0; pos < mdp.d_qname.size() ; ++pos ) {
-            char c=mdp.d_qname[pos] ;
-            if(!isalnum(c) && c!='-' && c!='.')
-              break;
-          }
-          if(pos ==mdp.d_qname.size()) {
-            cout << "insert into dnsstats (source, port, id, query, qtype, tstampSec, tstampUsec, arcount) values ('" << entry.ip.toString() <<"', "<< ntohs(entry.port) <<", "<< ntohs(dh->id);
-            cout <<", '"<<mdp.d_qname<<"', "<<mdp.d_qtype<<", " << pr.d_pheader.ts.tv_sec <<", " << pr.d_pheader.ts.tv_usec;
-            cout <<", "<< ntohs(dh->arcount) <<");\n";
-          }
+          cout << "insert into dnsstats (source, port, id, query, qtype, tstampSec, tstampUsec, arcount) values ('" << entry.ip.toString() <<"', "<< ntohs(entry.port) <<", "<< ntohs(dh->id);
+          cout <<", '"<<mdp.d_qname.toString()<<"', "<<mdp.d_qtype<<", " << pr.d_pheader.ts.tv_sec <<", " << pr.d_pheader.ts.tv_usec;
+          cout <<", "<< ntohs(dh->arcount) <<");\n";
 
         }
         catch(MOADNSException& mde) {