]> git.ipfire.org Git - thirdparty/pdns.git/blobdiff - pdns/dnsscan.cc
Merge pull request #14185 from omoerbeek/rec-map-limit
[thirdparty/pdns.git] / pdns / dnsscan.cc
index 7127e1b74638d020ff220eb763ff395e1cee3d79..e447c1a681b6a614d4862625c1652e57c4ed9075 100644 (file)
@@ -28,8 +28,6 @@
 #include "sstuff.hh"
 #include "anadns.hh"
 
-// this is needed because boost multi_index also uses 'L', as do we (which is sad enough)
-#undef L
 
 #include <set>
 #include <deque>
@@ -46,7 +44,7 @@ using namespace ::boost::multi_index;
 #include "namespaces.hh"
 StatBag S;
 
-void usage() {
+static void usage() {
   cerr<<"syntax: dnsscan INFILE ..."<<endl;
 }
 
@@ -87,13 +85,13 @@ try
     
     while(pr.getUDPPacket()) {
       try {
-        MOADNSParser mdp((const char*)pr.d_payload, pr.d_len);
+        MOADNSParser mdp(false, (const char*)pr.d_payload, pr.d_len);
         if(mdp.d_qtype < 256)
           counts[mdp.d_qtype]++;
 
       }
-      catch(MOADNSException &e) {
-        cout<<"Error from remote "<<pr.getSource().toString()<<": "<<e.what()<<"\n";
+      catch(const MOADNSException &mde) {
+        cout<<"Error from remote "<<pr.getSource().toString()<<": "<<mde.what()<<"\n";
         //        sock.sendTo(string(pr.d_payload, pr.d_payload + pr.d_len), remote);
       }
     }