]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
improve error message on errors emanating from gettag
authorbert hubert <bert.hubert@netherlabs.nl>
Sun, 6 Mar 2016 20:02:28 +0000 (21:02 +0100)
committerbert hubert <bert.hubert@netherlabs.nl>
Sun, 6 Mar 2016 20:02:28 +0000 (21:02 +0100)
pdns/pdns_recursor.cc

index 311008aa5d9dd01a890ce636a8f17c3a60ac848b..9d4ace5148874f1a735d4359f326e49585ee5228 100644 (file)
@@ -1169,7 +1169,13 @@ string* doProcessUDPQuestion(const std::string& question, const ComboAddress& fr
             }
           }
         }
-        ctag=(*t_pdl)->gettag(fromaddr, ednssubnet, destaddr, qname, qtype);
+        try {
+          ctag=(*t_pdl)->gettag(fromaddr, ednssubnet, destaddr, qname, qtype);
+        }
+        catch(std::exception& e)  {
+          if(g_logCommonErrors)
+            L<<Logger::Warning<<"Error parsing a query packet qname='"<<qname<<"' for tag determination, setting tag=0: "<<e.what()<<endl;
+        }
       }
       catch(std::exception& e)
       {