From: Otto Moerbeek Date: Wed, 5 Jan 2022 11:49:45 +0000 (+0100) Subject: If the update policy Lua file cannot be read, don't fall back to allow-all policy. X-Git-Tag: rec-4.8.0-alpha1~31^2~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b6f77d0372c189c78b578a2b1f0dfe83334401d3;p=thirdparty%2Fpdns.git If the update policy Lua file cannot be read, don't fall back to allow-all policy. --- diff --git a/pdns/packethandler.cc b/pdns/packethandler.cc index cc9328824d..d74efbd1dd 100644 --- a/pdns/packethandler.cc +++ b/pdns/packethandler.cc @@ -88,7 +88,9 @@ PacketHandler::PacketHandler():B(s_programname), d_dk(&B) else { d_update_policy_lua = std::make_unique(); - d_update_policy_lua->loadFile(fname); + if (d_update_policy_lua->loadFile(fname) != 0) { + d_update_policy_lua = nullptr; + } } }