#include "zoneparser-tng.hh"
#include "logger.hh"
#include "dnsrecords.hh"
+#include <boost/foreach.hpp>
+
+extern int g_argc;
+extern char** g_argv;
void primeHints(void)
{
if(!::arg().preParseFile(configname.c_str(), "forward-zones"))
L<<Logger::Warning<<"Unable to re-parse configuration file '"<<configname<<"'"<<endl;
-
+ ::arg().preParse(g_argc, g_argv, "forward-zones");
::arg().preParseFile(configname.c_str(), "forward-zones-file");
+ ::arg().preParse(g_argc, g_argv, "forward-zones-file");
::arg().preParseFile(configname.c_str(), "auth-zones");
+ ::arg().preParse(g_argc, g_argv, "auth-zones");
::arg().preParseFile(configname.c_str(), "export-etc-hosts", "off");
+ ::arg().preParse(g_argc, g_argv, "export-etc-hosts");
::arg().preParseFile(configname.c_str(), "serve-rfc1918");
+ ::arg().preParse(g_argc, g_argv, "serve-rfc1918");
+ ::arg().preParseFile(configname.c_str(), "include-dir");
+ ::arg().preParse(g_argc, g_argv, "include-dir");
+
+ // then process includes
+ std::vector<std::string> extraConfigs;
+ ::arg().gatherIncludes(extraConfigs);
+
+ BOOST_FOREACH(const std::string& fn, extraConfigs) {
+ ::arg().preParseFile(fn.c_str(), "forward-zones", ::arg()["forward-zones"]);
+ ::arg().preParseFile(fn.c_str(), "forward-zones-file", ::arg()["forward-zones-file"]);
+ ::arg().preParseFile(fn.c_str(), "auth-zones",::arg()["auth-zones"]);
+ ::arg().preParseFile(fn.c_str(), "export-etc-hosts",::arg()["export-etc-hosts"]);
+ ::arg().preParseFile(fn.c_str(), "serve-rfc1918",::arg()["serve-rfc1918"]);
+ }
SyncRes::domainmap_t* newDomainMap = parseAuthAndForwards();