]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
recursor: limit long version strings to 63 characters and catch exceptions in secpoll 2077/head
authorKees Monshouwer <mind04@monshouwer.org>
Tue, 13 Jan 2015 11:54:45 +0000 (12:54 +0100)
committermind04 <mind04@monshouwer.org>
Tue, 13 Jan 2015 12:15:11 +0000 (13:15 +0100)
pdns/pdns_recursor.cc
pdns/secpoll-recursor.cc

index 5cda0f0f4f47dd7476669a4d8714eec9385df035..1e4a07bae76741069b438e1f7fc5eba5349ac09a 100644 (file)
@@ -1317,7 +1317,10 @@ try
     }
 
     if(now.tv_sec - last_secpoll >= 3600) {
-      doSecPoll(&last_secpoll);
+      try {
+        doSecPoll(&last_secpoll);
+      }
+      catch(...) {}
     }
   }
 }
index 0c56e72df5154b848ecb7a043ac8d1447b0741b3..ffd227b7faf7cfd36bd945bf11d2bb3abca35c9d 100644 (file)
@@ -23,7 +23,8 @@ void doSecPoll(time_t* last_secpoll)
   
   vector<DNSResourceRecord> ret;
 
-  string query = "recursor-" +string(PACKAGEVERSION)+ ".security-status."+::arg()["security-poll-suffix"];
+  string version = "recursor-" +string(PACKAGEVERSION);
+  string query = version.substr(0, 63)+ ".security-status."+::arg()["security-poll-suffix"];
 
   if(*query.rbegin()!='.')
     query+='.';