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

pdns/rec-lua-conf.cc

index fa6a4c13bddb7c728172740a3a1ba7487a0e7598..3631dc276152148c7227b53891e35e1c94e6ddba 100644 (file)
@@ -300,8 +300,13 @@ static void rpzPrimary(LuaConfigItems& lci, luaConfigDelayedThreads& delayedThre
           throw PDNSException("The RPZ zone " + zoneName + " loaded from the seed file (" + zone->getDomain().toString() + ") has no SOA record");
         }
       }
+      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();
       }
     }
   }