]> git.ipfire.org Git - thirdparty/pdns.git/blame - pdns/recursordist/ecs.cc
Merge pull request #5332 from rgacogne/edns-truncate-tests
[thirdparty/pdns.git] / pdns / recursordist / ecs.cc
CommitLineData
35695d18 1#include "syncres.hh"
2#include "arguments.hh"
3
4NetmaskGroup g_ednssubnets;
5SuffixMatchNode g_ednsdomains;
b40562da 6bool g_useIncomingECS;
35695d18 7
35695d18 8void parseEDNSSubnetWhitelist(const std::string& wlist)
9{
10 vector<string> parts;
11 stringtok(parts, wlist, ",; ");
12 for(const auto& a : parts) {
13 try {
14 Netmask nm(a);
15 g_ednssubnets.addMask(nm);
16 }
17 catch(...) {
18 g_ednsdomains.add(DNSName(a));
19 }
20 }
21}