]> git.ipfire.org Git - thirdparty/pdns.git/blob - pdns/recursordist/ecs.cc
Merge pull request #5332 from rgacogne/edns-truncate-tests
[thirdparty/pdns.git] / pdns / recursordist / ecs.cc
1 #include "syncres.hh"
2 #include "arguments.hh"
3
4 NetmaskGroup g_ednssubnets;
5 SuffixMatchNode g_ednsdomains;
6 bool g_useIncomingECS;
7
8 void 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 }