From: Kees Monshouwer Date: Tue, 13 Jan 2015 11:54:45 +0000 (+0100) Subject: recursor: limit long version strings to 63 characters and catch exceptions in secpoll X-Git-Tag: rec-3.7.0-rc1~6^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F2077%2Fhead;p=thirdparty%2Fpdns.git recursor: limit long version strings to 63 characters and catch exceptions in secpoll --- diff --git a/pdns/pdns_recursor.cc b/pdns/pdns_recursor.cc index 5cda0f0f4f..1e4a07bae7 100644 --- a/pdns/pdns_recursor.cc +++ b/pdns/pdns_recursor.cc @@ -1317,7 +1317,10 @@ try } if(now.tv_sec - last_secpoll >= 3600) { - doSecPoll(&last_secpoll); + try { + doSecPoll(&last_secpoll); + } + catch(...) {} } } } diff --git a/pdns/secpoll-recursor.cc b/pdns/secpoll-recursor.cc index 0c56e72df5..ffd227b7fa 100644 --- a/pdns/secpoll-recursor.cc +++ b/pdns/secpoll-recursor.cc @@ -23,7 +23,8 @@ void doSecPoll(time_t* last_secpoll) vector 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+='.';