From: Pieter Lexis Date: Thu, 26 Nov 2015 13:58:51 +0000 (+0100) Subject: Allow the use of spaces to parse options X-Git-Tag: dnsdist-1.0.0-alpha1~196^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=39588f55881d7681b1f5e4b319fd30710c313890;p=pdns Allow the use of spaces to parse options --- diff --git a/pdns/pdns_recursor.cc b/pdns/pdns_recursor.cc index bcd6d45c9..886a959cc 100644 --- a/pdns/pdns_recursor.cc +++ b/pdns/pdns_recursor.cc @@ -2096,7 +2096,7 @@ boost::optional getEDNSSubnetMask(const ComboAddress& local, const DNSN void parseEDNSSubnetWhitelist(const std::string& wlist) { vector parts; - stringtok(parts, wlist, ",;"); + stringtok(parts, wlist, ",; "); for(const auto& a : parts) { try { Netmask nm(a); diff --git a/pdns/receiver.cc b/pdns/receiver.cc index b729a48b6..4ad1e6d96 100644 --- a/pdns/receiver.cc +++ b/pdns/receiver.cc @@ -359,7 +359,7 @@ static void loadModules() if(!::arg()["load-modules"].empty()) { vectormodules; - stringtok(modules,::arg()["load-modules"],","); + stringtok(modules,::arg()["load-modules"],", "); for(vector::const_iterator i=modules.begin();i!=modules.end();++i) { bool res; diff --git a/pdns/reczones.cc b/pdns/reczones.cc index 4f0237cd2..0493eece2 100644 --- a/pdns/reczones.cc +++ b/pdns/reczones.cc @@ -374,14 +374,14 @@ void ixfrTracker(const ComboAddress& master, const DNSName& zone, shared_ptr fnames; - stringtok(fnames, ::arg()["rpz-files"],","); + stringtok(fnames, ::arg()["rpz-files"]," ,"); int count=0; for(const auto& f : fnames) { loadRPZFromFile(f, g_dfe, count++); } fnames.clear(); - stringtok(fnames, ::arg()["rpz-masters"],","); + stringtok(fnames, ::arg()["rpz-masters"]," ,"); for(const auto& f : fnames) { auto s = splitField(f, ':'); @@ -406,7 +406,7 @@ SyncRes::domainmap_t* parseAuthAndForwards() const char *option_names[3]={"auth-zones", "forward-zones", "forward-zones-recurse"}; for(int n=0; n < 3 ; ++n ) { parts.clear(); - stringtok(parts, ::arg()[option_names[n]], ",\t\n\r"); + stringtok(parts, ::arg()[option_names[n]], " ,\t\n\r"); for(parts_t::const_iterator iter = parts.begin(); iter != parts.end(); ++iter) { SyncRes::AuthDomain ad; pair headers=splitField(*iter, '=');