]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
make sure we don't set export-etc-hosts to 'on' on reload-zones. Discovered by paul...
authorBert Hubert <bert.hubert@netherlabs.nl>
Sun, 5 Apr 2009 19:45:37 +0000 (19:45 +0000)
committerBert Hubert <bert.hubert@netherlabs.nl>
Sun, 5 Apr 2009 19:45:37 +0000 (19:45 +0000)
Closes ticket 225

git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@1348 d19b8d6e-7fed-0310-83ef-9ca221ded41b

pdns/arguments.cc
pdns/arguments.hh
pdns/pdns_recursor.cc

index 30e4b9496aca8e4324e1be0cf80cafd91ece45fd..81acb5752957eabd8e65f14c75d6e9d2098ee38a 100644 (file)
@@ -341,9 +341,9 @@ void ArgvMap::preParse(int &argc, char **argv, const string &arg)
   }
 }
 
-bool ArgvMap::preParseFile(const char *fname, const string &arg)
+bool ArgvMap::preParseFile(const char *fname, const string &arg, const string& theDefault)
 {
-  params[arg].clear();
+  params[arg]=theDefault;
 
   ifstream f(fname);
   if(!f)
index 4dd81fc6a4aa8977c632d9fa7af52f66e8385de6..c4e1e3e38a5f15775e67bbf13e0b27ace6026678 100644 (file)
@@ -82,7 +82,7 @@ public:
     parse(argc,argv,true);
   }
   void preParse(int &argc, char **argv, const string &arg); //!< use this to preparse a single var
-  bool preParseFile(const char *fname, const string &arg); //!< use this to preparse a single var in configuration
+  bool preParseFile(const char *fname, const string &arg, const string& theDefault=""); //!< use this to preparse a single var in configuration
 
   bool file(const char *fname, bool lax=false); //!< Parses a file with parameters
   bool laxFile(const char *fname) 
index 94e573c36f0d0ab93507918e61fa3b17009692ae..3ab24b65131f27bb59d7e43b29c7ef2c06967a45 100644 (file)
@@ -1485,7 +1485,7 @@ string reloadAuthAndForwards()
       L<<Logger::Warning<<"Unable to re-parse configuration file '"<<configname<<"'"<<endl;
     
     ::arg().preParseFile(configname.c_str(), "auth-zones");
-    ::arg().preParseFile(configname.c_str(), "export-etc-hosts");
+    ::arg().preParseFile(configname.c_str(), "export-etc-hosts", "off");
     ::arg().preParseFile(configname.c_str(), "serve-rfc1918");
     
     parseAuthAndForwards();