]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Exception loading the RPZ seedfile is not fatal. 10313/head
authorOtto <otto.moerbeek@open-xchange.com>
Tue, 13 Apr 2021 13:16:09 +0000 (15:16 +0200)
committerOtto <otto.moerbeek@open-xchange.com>
Mon, 19 Apr 2021 13:40:49 +0000 (15:40 +0200)
Catch PDNSException and clear on failure.

(cherry picked from commit a47cc75dfa7519bcf7b31cee511852ae954a50f8)

pdns/rec-lua-conf.cc

index 0481c8a0cc06b11d8ef02b8af125a0c4c852660c..8737f63204dfcb69d2db514a3d22a446579fb2af 100644 (file)
@@ -370,8 +370,13 @@ void loadRecursorLuaConfig(const std::string& fname, luaConfigDelayedThreads& de
               throw PDNSException("The RPZ zone " + zoneName + " loaded from the seed file (" + zone->getDomain().toString() + ") has no SOA record");
             }
           }
-          catch(const std::exception& e) {
+          catch(const PDNSException& e) {
+            g_log<<Logger::Warning<<"Unable to pre-load RPZ zone "<<zoneName<<" from seed file '"<<seedFile<<"': "<<e.reason<<endl;
+            zone->clear();
+          }
+         catch(const std::exception& e) {
             g_log<<Logger::Warning<<"Unable to pre-load RPZ zone "<<zoneName<<" from seed file '"<<seedFile<<"': "<<e.what()<<endl;
+            zone->clear();
           }
         }
       }