From: bert hubert Date: Tue, 25 Nov 2014 13:53:03 +0000 (+0100) Subject: clean up dnsgram a bit (remove old one-off tests, document the output files, no longe... X-Git-Tag: rec-3.7.0-rc1~163 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=eda307fc564e456147e577ff7614dc01d1f2f514;p=pdns clean up dnsgram a bit (remove old one-off tests, document the output files, no longer lie about what the 'success' file contains) --- diff --git a/pdns/dnsgram.cc b/pdns/dnsgram.cc index 2696aeff4..80eaedbde 100644 --- a/pdns/dnsgram.cc +++ b/pdns/dnsgram.cc @@ -112,20 +112,10 @@ try pr.d_len > 12) { try { MOADNSParser mdp((const char*)pr.d_payload, pr.d_len); - if(mdp.d_header.id==htons(4575)) { -// cerr << ntohl(*(uint32_t*)&pr.d_ip->ip_src)< 1176897290 && pr.d_pheader.ts.tv_sec < 1176897310 ) - // pw.write(); if(mdp.d_header.rd && !mdp.d_header.qr) { g_lastquestionTime=pr.d_pheader.ts; @@ -151,11 +141,10 @@ try g_serverResponses++; } - if(pr.d_pheader.ts.tv_sec - lastreport.tv_sec > 5) { + if(pr.d_pheader.ts.tv_sec - lastreport.tv_sec >= 5) { makeReport(pr.d_pheader.ts); lastreport = pr.d_pheader.ts; - } - + } } catch(MOADNSException& mde) { // cerr<<"error parsing packet: "<first << "\t" << DNSRecordContent::NumberToType(i->second) << "\t"<< counts[make_pair(i->first, i->second)]<<"\n"; } @@ -188,8 +177,9 @@ try set_difference(answers.begin(), answers.end(), questions.begin(), questions.end(), back_inserter(diff)); cerr<first << "\t" <second) << "\t" << counts[make_pair(i->first, i->second)]<<"\n"; }