]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Stop using potentially offensive names internally and warn about
authorOtto <otto.moerbeek@open-xchange.com>
Tue, 13 Apr 2021 08:47:38 +0000 (10:47 +0200)
committerOtto <otto.moerbeek@open-xchange.com>
Tue, 13 Apr 2021 08:50:21 +0000 (10:50 +0200)
deprecated settings.

15 files changed:
pdns/arguments.cc
pdns/ixfr.cc
pdns/ixfr.hh
pdns/pdns_recursor.cc
pdns/rec-lua-conf.cc
pdns/rec-lua-conf.hh
pdns/rec-snmp.cc
pdns/rec-snmp.hh
pdns/rec_channel.hh
pdns/rec_channel_rec.cc
pdns/rpzloader.cc
pdns/rpzloader.hh
pdns/syncres.cc
pdns/syncres.hh
pdns/ws-recursor.cc

index 865d30756a77292d9bae97ce963e2fa476fc5802..4ece63184dbd5e6583786c8e9c37a30e03414b79 100644 (file)
@@ -347,6 +347,25 @@ bool ArgvMap::parmIsset(const string &var)
   return d_params.find(var) != d_params.end();
 }
 
+// ATM Shared between Recursor and Auth, is that a good idea?
+static const map<string,string> deprecateList = {
+  { "stats-api-blacklist", "stats-api-disabled-list" },
+  { "stats-carbon-blacklist", "stats-carbon-disabled-list" },
+  { "stats-rec-control-blacklist", "stats-rec-control-disabled-list" },
+  { "stats-snmp-blacklist", "stats-snmp-disabled-list" },
+  { "edns-subnet-whitelist", "edns-subnet-allow-list" },
+  { "new-domain-whitelist", "new-domain-ignore-list" },
+  { "snmp-master-socket", "snmp-daemon-socket" }
+};
+
+static void warnIfDeprecated(const string& var)
+{
+  const auto msg = deprecateList.find(var);
+  if (msg != deprecateList.end()) {
+    g_log << Logger::Warning << "'" << var << "' is deprecated and will be removed in a future release, use '" << msg->second << "' instead" << endl;
+  }
+}
+
 void ArgvMap::parseOne(const string &arg, const string &parseOnly, bool lax)
 {
   string var, val;
@@ -380,6 +399,7 @@ void ArgvMap::parseOne(const string &arg, const string &parseOnly, bool lax)
   boost::trim(var);
 
   if(var!="" && (parseOnly.empty() || var==parseOnly)) {
+    warnIfDeprecated(var);
     pos=val.find_first_not_of(" \t");  // strip leading whitespace
     if(pos && pos!=string::npos)
       val=val.substr(pos);
index dfda4d3f50f38632ec9a9697b712527323c94ef6..7b47f1affd7922d41c49be414eb46fda2b770833 100644 (file)
 #include "dnssecinfra.hh"
 #include "tsigverifier.hh"
 
-vector<pair<vector<DNSRecord>, vector<DNSRecord> > > processIXFRRecords(const ComboAddress& master, const DNSName& zone,
-                                                                        const vector<DNSRecord>& records, const std::shared_ptr<SOARecordContent>& masterSOA)
+vector<pair<vector<DNSRecord>, vector<DNSRecord> > > processIXFRRecords(const ComboAddress& primary, const DNSName& zone,
+                                                                        const vector<DNSRecord>& records, const std::shared_ptr<SOARecordContent>& primarySOA)
 {
   vector<pair<vector<DNSRecord>, vector<DNSRecord> > >  ret;
 
-  if (records.size() == 0 || masterSOA == nullptr) {
+  if (records.size() == 0 || primarySOA == nullptr) {
     return ret;
   }
 
@@ -51,14 +51,14 @@ vector<pair<vector<DNSRecord>, vector<DNSRecord> > > processIXFRRecords(const Co
 
     auto sr = getRR<SOARecordContent>(records[pos]);
     if (!sr) {
-      throw std::runtime_error("Error getting the content of the first SOA record of this IXFR sequence for zone '"+zone.toLogString()+"' from master '"+master.toStringWithPort()+"'");
+      throw std::runtime_error("Error getting the content of the first SOA record of this IXFR sequence for zone '"+zone.toLogString()+"' from primary '"+primary.toStringWithPort()+"'");
     }
 
-    // cerr<<"Serial is "<<sr->d_st.serial<<", final serial is "<<masterSOA->d_st.serial<<endl;
+    // cerr<<"Serial is "<<sr->d_st.serial<<", final serial is "<<primarySOA->d_st.serial<<endl;
 
     // the serial of this SOA record is the serial of the
     // zone before the removals and updates of this sequence
-    if (sr->d_st.serial == masterSOA->d_st.serial) {
+    if (sr->d_st.serial == primarySOA->d_st.serial) {
       if (records.size() == 2) {
         // if the entire update is two SOAs records with the same
         // serial, this is actually an empty AXFR!
@@ -77,12 +77,12 @@ vector<pair<vector<DNSRecord>, vector<DNSRecord> > > processIXFRRecords(const Co
     }
 
     if (pos >= records.size()) {
-      throw std::runtime_error("No SOA record to finish the removals part of the IXFR sequence of zone '" + zone.toLogString() + "' from " + master.toStringWithPort());
+      throw std::runtime_error("No SOA record to finish the removals part of the IXFR sequence of zone '" + zone.toLogString() + "' from " + primary.toStringWithPort());
     }
 
     sr = getRR<SOARecordContent>(records[pos]);
     if (!sr) {
-      throw std::runtime_error("Invalid SOA record to finish the removals part of the IXFR sequence of zone '" + zone.toLogString() + "' from " + master.toStringWithPort());
+      throw std::runtime_error("Invalid SOA record to finish the removals part of the IXFR sequence of zone '" + zone.toLogString() + "' from " + primary.toStringWithPort());
     }
 
     // this is the serial of the zone after the removals
@@ -97,22 +97,22 @@ vector<pair<vector<DNSRecord>, vector<DNSRecord> > > processIXFRRecords(const Co
     }
 
     if (pos >= records.size()) {
-      throw std::runtime_error("No SOA record to finish the additions part of the IXFR sequence of zone '" + zone.toLogString() + "' from " + master.toStringWithPort());
+      throw std::runtime_error("No SOA record to finish the additions part of the IXFR sequence of zone '" + zone.toLogString() + "' from " + primary.toStringWithPort());
     }
 
     sr = getRR<SOARecordContent>(records[pos]);
     if (!sr) {
-      throw std::runtime_error("Invalid SOA record to finish the additions part of the IXFR sequence of zone '" + zone.toLogString() + "' from " + master.toStringWithPort());
+      throw std::runtime_error("Invalid SOA record to finish the additions part of the IXFR sequence of zone '" + zone.toLogString() + "' from " + primary.toStringWithPort());
     }
 
     if (sr->d_st.serial != newSerial) {
-      throw std::runtime_error("Invalid serial (" + std::to_string(sr->d_st.serial) + ", expecting " + std::to_string(newSerial) + ") in the SOA record finishing the additions part of the IXFR sequence of zone '" + zone.toLogString() + "' from " + master.toStringWithPort());
+      throw std::runtime_error("Invalid serial (" + std::to_string(sr->d_st.serial) + ", expecting " + std::to_string(newSerial) + ") in the SOA record finishing the additions part of the IXFR sequence of zone '" + zone.toLogString() + "' from " + primary.toStringWithPort());
     }
 
-    if (newSerial == masterSOA->d_st.serial) {
+    if (newSerial == primarySOA->d_st.serial) {
       // this was the last sequence
       if (pos != (records.size() - 1)) {
-        throw std::runtime_error("Trailing records after the last IXFR sequence of zone '" + zone.toLogString() + "' from " + master.toStringWithPort());
+        throw std::runtime_error("Trailing records after the last IXFR sequence of zone '" + zone.toLogString() + "' from " + primary.toStringWithPort());
       }
     }
 
@@ -123,7 +123,7 @@ vector<pair<vector<DNSRecord>, vector<DNSRecord> > > processIXFRRecords(const Co
 }
 
 // Returns pairs of "remove & add" vectors. If you get an empty remove, it means you got an AXFR!
-vector<pair<vector<DNSRecord>, vector<DNSRecord> > > getIXFRDeltas(const ComboAddress& master, const DNSName& zone, const DNSRecord& oursr, 
+vector<pair<vector<DNSRecord>, vector<DNSRecord> > > getIXFRDeltas(const ComboAddress& primary, const DNSName& zone, const DNSRecord& oursr, 
                                                                    const TSIGTriplet& tt, const ComboAddress* laddr, size_t maxReceivedBytes)
 {
   vector<pair<vector<DNSRecord>, vector<DNSRecord> > >  ret;
@@ -137,7 +137,7 @@ vector<pair<vector<DNSRecord>, vector<DNSRecord> > > getIXFRDeltas(const ComboAd
 
   pw.commit();
   TSIGRecordContent trc;
-  TSIGTCPVerifier tsigVerifier(tt, master, trc);
+  TSIGTCPVerifier tsigVerifier(tt, primary, trc);
   if(!tt.algo.empty()) {
     TSIGHashEnum the;
     getTSIGHashEnum(tt.algo, the);
@@ -156,22 +156,22 @@ vector<pair<vector<DNSRecord>, vector<DNSRecord> > > getIXFRDeltas(const ComboAd
   string msg((const char*)&len, 2);
   msg.append((const char*)&packet[0], packet.size());
 
-  Socket s(master.sin4.sin_family, SOCK_STREAM);
+  Socket s(primary.sin4.sin_family, SOCK_STREAM);
   //  cout<<"going to connect"<<endl;
   if(laddr)
     s.bind(*laddr);
-  s.connect(master);
+  s.connect(primary);
   //  cout<<"Connected"<<endl;
   s.writen(msg);
 
-  // CURRENT MASTER SOA
+  // CURRENT PRIMARY SOA
   // REPEAT:
   //   SOA WHERE THIS DELTA STARTS
   //   RECORDS TO REMOVE
   //   SOA WHERE THIS DELTA GOES
   //   RECORDS TO ADD
-  // CURRENT MASTER SOA 
-  std::shared_ptr<SOARecordContent> masterSOA = nullptr;
+  // CURRENT PRIMARY SOA 
+  std::shared_ptr<SOARecordContent> primarySOA = nullptr;
   vector<DNSRecord> records;
   size_t receivedBytes = 0;
   int8_t ixfrInProgress = -2;
@@ -191,7 +191,7 @@ vector<pair<vector<DNSRecord>, vector<DNSRecord> > > getIXFRDeltas(const ComboAd
       break;
 
     if (maxReceivedBytes > 0 && (maxReceivedBytes - receivedBytes) < (size_t) len)
-      throw std::runtime_error("Reached the maximum number of received bytes in an IXFR delta for zone '"+zone.toLogString()+"' from master "+master.toStringWithPort());
+      throw std::runtime_error("Reached the maximum number of received bytes in an IXFR delta for zone '"+zone.toLogString()+"' from primary "+primary.toStringWithPort());
 
     reply.resize(len);
     readn2(s.getHandle(), &reply.at(0), len);
@@ -199,7 +199,7 @@ vector<pair<vector<DNSRecord>, vector<DNSRecord> > > getIXFRDeltas(const ComboAd
 
     MOADNSParser mdp(false, reply);
     if(mdp.d_header.rcode) 
-      throw std::runtime_error("Got an error trying to IXFR zone '"+zone.toLogString()+"' from master '"+master.toStringWithPort()+"': "+RCode::to_s(mdp.d_header.rcode));
+      throw std::runtime_error("Got an error trying to IXFR zone '"+zone.toLogString()+"' from primary '"+primary.toStringWithPort()+"': "+RCode::to_s(mdp.d_header.rcode));
 
     //    cout<<"Got a response, rcode: "<<mdp.d_header.rcode<<", got "<<mdp.d_answers.size()<<" answers"<<endl;
 
@@ -209,31 +209,31 @@ vector<pair<vector<DNSRecord>, vector<DNSRecord> > > getIXFRDeltas(const ComboAd
 
     for(auto& r: mdp.d_answers) {
       //      cout<<r.first.d_name<< " " <<r.first.d_content->getZoneRepresentation()<<endl;
-      if(!masterSOA) {
+      if(!primarySOA) {
         // we have not seen the first SOA record yet
         if (r.first.d_type != QType::SOA) {
-          throw std::runtime_error("The first record of the IXFR answer for zone '"+zone.toLogString()+"' from master '"+master.toStringWithPort()+"' is not a SOA ("+QType(r.first.d_type).getName()+")");
+          throw std::runtime_error("The first record of the IXFR answer for zone '"+zone.toLogString()+"' from primary '"+primary.toStringWithPort()+"' is not a SOA ("+QType(r.first.d_type).getName()+")");
         }
 
         auto sr = getRR<SOARecordContent>(r.first);
         if (!sr) {
-          throw std::runtime_error("Error getting the content of the first SOA record of the IXFR answer for zone '"+zone.toLogString()+"' from master '"+master.toStringWithPort()+"'");
+          throw std::runtime_error("Error getting the content of the first SOA record of the IXFR answer for zone '"+zone.toLogString()+"' from primary '"+primary.toStringWithPort()+"'");
         }
 
         if(sr->d_st.serial == std::dynamic_pointer_cast<SOARecordContent>(oursr.d_content)->d_st.serial) {
           // we are up to date
           return ret;
         }
-        masterSOA = sr;
+        primarySOA = sr;
       } else if (r.first.d_type == QType::SOA) {
         auto sr = getRR<SOARecordContent>(r.first);
         if (!sr) {
-          throw std::runtime_error("Error getting the content of SOA record of IXFR answer for zone '"+zone.toLogString()+"' from master '"+master.toStringWithPort()+"'");
+          throw std::runtime_error("Error getting the content of SOA record of IXFR answer for zone '"+zone.toLogString()+"' from primary '"+primary.toStringWithPort()+"'");
         }
 
         // we hit the last SOA record
         // IXFR is considered to be done if we hit the last SOA record twice
-        if (masterSOA->d_st.serial == sr->d_st.serial) {
+        if (primarySOA->d_st.serial == sr->d_st.serial) {
           ixfrInProgress++;
         }
       }
@@ -245,7 +245,7 @@ vector<pair<vector<DNSRecord>, vector<DNSRecord> > > getIXFRDeltas(const ComboAd
         if(r.first.d_type == QType::OPT)
           continue;
 
-        throw std::runtime_error("Unexpected record (" +QType(r.first.d_type).getName()+") in non-answer section ("+std::to_string(r.first.d_place)+")in IXFR response for zone '"+zone.toLogString()+"' from master '"+master.toStringWithPort());
+        throw std::runtime_error("Unexpected record (" +QType(r.first.d_type).getName()+") in non-answer section ("+std::to_string(r.first.d_place)+")in IXFR response for zone '"+zone.toLogString()+"' from primary '"+primary.toStringWithPort());
       }
 
       r.first.d_name.makeUsRelative(zone);
@@ -255,5 +255,5 @@ vector<pair<vector<DNSRecord>, vector<DNSRecord> > > getIXFRDeltas(const ComboAd
 
   //  cout<<"Got "<<records.size()<<" records"<<endl;
 
-  return processIXFRRecords(master, zone, records, masterSOA);
+  return processIXFRRecords(primary, zone, records, primarySOA);
 }
index 3444a798bd201ecf1e2adbd35c42ae95718070ae..341fb82f7b7ee3212832a3791061e15ba8fb375a 100644 (file)
@@ -25,9 +25,9 @@
 #include "dnsparser.hh"
 #include "dnsrecords.hh"
 
-vector<pair<vector<DNSRecord>, vector<DNSRecord> > >   getIXFRDeltas(const ComboAddress& master, const DNSName& zone, 
+vector<pair<vector<DNSRecord>, vector<DNSRecord> > >   getIXFRDeltas(const ComboAddress& primary, const DNSName& zone, 
                                                                      const DNSRecord& sr, const TSIGTriplet& tt=TSIGTriplet(),
                                                                      const ComboAddress* laddr=0, size_t maxReceivedBytes=0);
 
-vector<pair<vector<DNSRecord>, vector<DNSRecord> > > processIXFRRecords(const ComboAddress& master, const DNSName& zone,
-                                                                        const vector<DNSRecord>& records, const std::shared_ptr<SOARecordContent>& masterSOA);
+vector<pair<vector<DNSRecord>, vector<DNSRecord> > > processIXFRRecords(const ComboAddress& primary, const DNSName& zone,
+                                                                        const vector<DNSRecord>& records, const std::shared_ptr<SOARecordContent>& primarySOA);
index 5ff39d9fc8ecac7d1c1ae77c9382e55f0762bdb5..dd9c4b221934df89b0136e9583e0bf09df70c58a 100644 (file)
@@ -1308,7 +1308,7 @@ static bool checkFrameStreamExport(LocalStateHolder<LuaConfigItems>& luaconfsLoc
 static bool nodCheckNewDomain(const DNSName& dname)
 {
   bool ret = false;
-  // First check the (sub)domain isn't whitelisted for NOD purposes
+  // First check the (sub)domain isn't ignored for NOD purposes
   if (!g_nodDomainWL.check(dname)) {
     // Now check the NODDB (note this is probabilistic so can have FNs/FPs)
     if (t_nodDBp && t_nodDBp->isNewDomain(dname)) {
@@ -4499,7 +4499,7 @@ static void setupNODThread()
   }
 }
 
-static void parseNODWhitelist(const std::string& wlist)
+static void parseNODIgnorelist(const std::string& wlist)
 {
   vector<string> parts;
   stringtok(parts, wlist, ",; ");
@@ -4514,8 +4514,8 @@ static void setupNODGlobal()
   g_nodEnabled = ::arg().mustDo("new-domain-tracking");
   g_nodLookupDomain = DNSName(::arg()["new-domain-lookup"]);
   g_nodLog = ::arg().mustDo("new-domain-log");
-  parseNODWhitelist(::arg()["new-domain-whitelist"]);
-  parseNODWhitelist(::arg()["new-domain-ignore-list"]);
+  parseNODIgnorelist(::arg()["new-domain-whitelist"]);
+  parseNODIgnorelist(::arg()["new-domain-ignore-list"]);
 
   // Setup Unique DNS Response subsystem
   g_udrEnabled = ::arg().mustDo("unique-response-tracking");
@@ -4767,8 +4767,8 @@ static int serviceMain(int argc, char*argv[])
     SyncRes::setECSScopeZeroAddress(nm);
   }
 
-  SyncRes::parseEDNSSubnetWhitelist(::arg()["edns-subnet-whitelist"]);
-  SyncRes::parseEDNSSubnetWhitelist(::arg()["edns-subnet-allow-list"]);
+  SyncRes::parseEDNSSubnetAllowlist(::arg()["edns-subnet-whitelist"]);
+  SyncRes::parseEDNSSubnetAllowlist(::arg()["edns-subnet-allow-list"]);
   SyncRes::parseEDNSSubnetAddFor(::arg()["ecs-add-for"]);
   g_useIncomingECS = ::arg().mustDo("use-incoming-edns-subnet");
 
@@ -5057,15 +5057,15 @@ static int serviceMain(int argc, char*argv[])
 
   g_useKernelTimestamp = ::arg().mustDo("protobuf-use-kernel-timestamp");
 
-  blacklistStats(StatComponent::API, ::arg()["stats-api-blacklist"]);
-  blacklistStats(StatComponent::Carbon, ::arg()["stats-carbon-blacklist"]);
-  blacklistStats(StatComponent::RecControl, ::arg()["stats-rec-control-blacklist"]);
-  blacklistStats(StatComponent::SNMP, ::arg()["stats-snmp-blacklist"]);
+  disableStats(StatComponent::API, ::arg()["stats-api-blacklist"]);
+  disableStats(StatComponent::Carbon, ::arg()["stats-carbon-blacklist"]);
+  disableStats(StatComponent::RecControl, ::arg()["stats-rec-control-blacklist"]);
+  disableStats(StatComponent::SNMP, ::arg()["stats-snmp-blacklist"]);
 
-  blacklistStats(StatComponent::API, ::arg()["stats-api-disabled-list"]);
-  blacklistStats(StatComponent::Carbon, ::arg()["stats-carbon-disabled-list"]);
-  blacklistStats(StatComponent::RecControl, ::arg()["stats-rec-control-disabled-list"]);
-  blacklistStats(StatComponent::SNMP, ::arg()["stats-snmp-disabled-list"]);
+  disableStats(StatComponent::API, ::arg()["stats-api-disabled-list"]);
+  disableStats(StatComponent::Carbon, ::arg()["stats-carbon-disabled-list"]);
+  disableStats(StatComponent::RecControl, ::arg()["stats-rec-control-disabled-list"]);
+  disableStats(StatComponent::SNMP, ::arg()["stats-snmp-disabled-list"]);
 
   if (::arg().mustDo("snmp-agent")) {
     string setting =  ::arg()["snmp-daemon-socket"];
@@ -5572,22 +5572,22 @@ int main(int argc, char **argv)
     ::arg().set("snmp-master-socket", "If set and snmp-agent is set, the socket to use to register to the SNMP daemon (deprecated)")="";
     ::arg().set("snmp-daemon-socket", "If set and snmp-agent is set, the socket to use to register to the SNMP daemon")="";
 
-    std::string defaultBlacklistedStats = "cache-bytes, packetcache-bytes, special-memory-usage";
+    std::string defeaultDisabledStats = "cache-bytes, packetcache-bytes, special-memory-usage";
     for (size_t idx = 0; idx < 32; idx++) {
-      defaultBlacklistedStats += ", ecs-v4-response-bits-" + std::to_string(idx + 1);
+      defeaultDisabledStats += ", ecs-v4-response-bits-" + std::to_string(idx + 1);
     }
     for (size_t idx = 0; idx < 128; idx++) {
-      defaultBlacklistedStats += ", ecs-v6-response-bits-" + std::to_string(idx + 1);
+      defeaultDisabledStats += ", ecs-v6-response-bits-" + std::to_string(idx + 1);
     }
-    ::arg().set("stats-api-blacklist", "List of statistics that are disabled when retrieving the complete list of statistics via the API (deprecated)")=defaultBlacklistedStats;
-    ::arg().set("stats-carbon-blacklist", "List of statistics that are prevented from being exported via Carbon (deprecated)")=defaultBlacklistedStats;
-    ::arg().set("stats-rec-control-blacklist", "List of statistics that are prevented from being exported via rec_control get-all (deprecated)")=defaultBlacklistedStats;
-    ::arg().set("stats-snmp-blacklist", "List of statistics that are prevented from being exported via SNMP (deprecated)")=defaultBlacklistedStats;
+    ::arg().set("stats-api-blacklist", "List of statistics that are disabled when retrieving the complete list of statistics via the API (deprecated)")=defeaultDisabledStats;
+    ::arg().set("stats-carbon-blacklist", "List of statistics that are prevented from being exported via Carbon (deprecated)")=defeaultDisabledStats;
+    ::arg().set("stats-rec-control-blacklist", "List of statistics that are prevented from being exported via rec_control get-all (deprecated)")=defeaultDisabledStats;
+    ::arg().set("stats-snmp-blacklist", "List of statistics that are prevented from being exported via SNMP (deprecated)")=defeaultDisabledStats;
 
-    ::arg().set("stats-api-disabled-list", "List of statistics that are disabled when retrieving the complete list of statistics via the API")=defaultBlacklistedStats;
-    ::arg().set("stats-carbon-disabled-list", "List of statistics that are prevented from being exported via Carbon")=defaultBlacklistedStats;
-    ::arg().set("stats-rec-control-disabled-list", "List of statistics that are prevented from being exported via rec_control get-all")=defaultBlacklistedStats;
-    ::arg().set("stats-snmp-disabled-list", "List of statistics that are prevented from being exported via SNMP")=defaultBlacklistedStats;
+    ::arg().set("stats-api-disabled-list", "List of statistics that are disabled when retrieving the complete list of statistics via the API")=defeaultDisabledStats;
+    ::arg().set("stats-carbon-disabled-list", "List of statistics that are prevented from being exported via Carbon")=defeaultDisabledStats;
+    ::arg().set("stats-rec-control-disabled-list", "List of statistics that are prevented from being exported via rec_control get-all")=defeaultDisabledStats;
+    ::arg().set("stats-snmp-disabled-list", "List of statistics that are prevented from being exported via SNMP")=defeaultDisabledStats;
 
     ::arg().set("tcp-fast-open", "Enable TCP Fast Open support on the listening sockets, using the supplied numerical value as the queue size")="0";
     ::arg().set("tcp-fast-open-connect", "Enable TCP Fast Open support on outgoing sockets")="no";
@@ -5642,7 +5642,7 @@ int main(int argc, char **argv)
 
     ::arg().set("edns-padding-from", "List of netmasks (proxy IP in case of XPF or proxy-protocol presence, client IP otherwise) for which EDNS padding will be enabled in responses, provided that 'edns-padding-mode' applies")="";
     ::arg().set("edns-padding-mode", "Whether to add EDNS padding to all responses ('always') or only to responses for queries containing the EDNS padding option ('padded-queries-only', the default). In both modes, padding will only be added to responses for queries coming from `edns-padding-from`_ sources")="padded-queries-only";
-    ::arg().set("edns-padding-tag", "Packetcache tag associated to responses sent with EDNS padding, to prevent sending these to non-whitelisted clients.")="7830";
+    ::arg().set("edns-padding-tag", "Packetcache tag associated to responses sent with EDNS padding, to prevent sending these toclients for which padding is not enabled.")="7830";
 
     ::arg().setCmd("help","Provide a helpful message");
     ::arg().setCmd("version","Print version string");
index fa6a4c13bddb7c728172740a3a1ba7487a0e7598..15e53c82d835ea4ae2923ef33275ec279ef4f35a 100644 (file)
@@ -205,7 +205,7 @@ static void parseFrameStreamOptions(boost::optional<frameStreamOptions_t> vars,
 }
 #endif /* HAVE_FSTRM */
 
-static void rpzPrimary(LuaConfigItems& lci, luaConfigDelayedThreads& delayedThreads, const boost::variant<string, std::vector<std::pair<int, string> > >& masters_, const string& zoneName, boost::optional<rpzOptions_t> options)
+static void rpzPrimary(LuaConfigItems& lci, luaConfigDelayedThreads& delayedThreads, const boost::variant<string, std::vector<std::pair<int, string>>>& primaries_, const string& zoneName, boost::optional<rpzOptions_t> options)
 {
   boost::optional<DNSFilterEngine::Policy> defpol;
   bool defpolOverrideLocal = true;
@@ -216,13 +216,13 @@ static void rpzPrimary(LuaConfigItems& lci, luaConfigDelayedThreads& delayedThre
   uint16_t axfrTimeout = 20;
   uint32_t maxTTL = std::numeric_limits<uint32_t>::max();
   ComboAddress localAddress;
-  std::vector<ComboAddress> masters;
-  if (masters_.type() == typeid(string)) {
-    masters.push_back(ComboAddress(boost::get<std::string>(masters_), 53));
+  std::vector<ComboAddress> primaries;
+  if (primaries_.type() == typeid(string)) {
+    primaries.push_back(ComboAddress(boost::get<std::string>(primaries_), 53));
   }
   else {
-    for (const auto& master : boost::get<std::vector<std::pair<int, std::string>>>(masters_)) {
-      masters.push_back(ComboAddress(master.second, 53));
+    for (const auto& primary : boost::get<std::vector<std::pair<int, std::string>>>(primaries_)) {
+      primaries.push_back(ComboAddress(primary.second, 53));
     }
   }
 
@@ -274,10 +274,10 @@ static void rpzPrimary(LuaConfigItems& lci, luaConfigDelayedThreads& delayedThre
     }
 
     if (localAddress != ComboAddress()) {
-      // We were passed a localAddress, check if its AF matches the masters'
-      for (const auto& master : masters) {
-        if (localAddress.sin4.sin_family != master.sin4.sin_family) {
-          throw PDNSException("Primary address("+master.toString()+") is not of the same Address Family as the local address ("+localAddress.toString()+").");
+      // We were passed a localAddress, check if its AF matches the primaries'
+      for (const auto& primary : primaries) {
+        if (localAddress.sin4.sin_family != primary.sin4.sin_family) {
+          throw PDNSException("Primary address("+primary.toString()+") is not of the same Address Family as the local address ("+localAddress.toString()+").");
         }
       }
     }
@@ -314,7 +314,7 @@ static void rpzPrimary(LuaConfigItems& lci, luaConfigDelayedThreads& delayedThre
     exit(1);  // FIXME proper exit code?
   }
 
-  delayedThreads.rpzMasterThreads.push_back(std::make_tuple(masters, defpol, defpolOverrideLocal, maxTTL, zoneIdx, tt, maxReceivedXFRMBytes, localAddress, axfrTimeout, refresh, sr, dumpFile));
+  delayedThreads.rpzPrimaryThreads.push_back(std::make_tuple(primaries, defpol, defpolOverrideLocal, maxTTL, zoneIdx, tt, maxReceivedXFRMBytes, localAddress, axfrTimeout, refresh, sr, dumpFile));
 }
 
 void loadRecursorLuaConfig(const std::string& fname, luaConfigDelayedThreads& delayedThreads)
@@ -385,11 +385,12 @@ void loadRecursorLuaConfig(const std::string& fname, luaConfigDelayedThreads& de
       }
     });
 
-  Lua.writeFunction("rpzMaster", [&lci, &delayedThreads](const boost::variant<string, std::vector<std::pair<int, string> > >& masters_, const string& zoneName, boost::optional<rpzOptions_t> options) {
-    rpzPrimary(lci, delayedThreads, masters_, zoneName, options);
+  Lua.writeFunction("rpzMaster", [&lci, &delayedThreads](const boost::variant<string, std::vector<std::pair<int, string> > >& primaries_, const string& zoneName, boost::optional<rpzOptions_t> options) {
+    g_log<<Logger::Warning<<"'rpzMaster' is deprecated and will be removed in a future release, use 'rpzPrimary' instead"<< endl;
+    rpzPrimary(lci, delayedThreads, primaries_, zoneName, options);
       });
-  Lua.writeFunction("rpzPrimary", [&lci, &delayedThreads](const boost::variant<string, std::vector<std::pair<int, string> > >& masters_, const string& zoneName, boost::optional<rpzOptions_t> options) {
-    rpzPrimary(lci, delayedThreads, masters_, zoneName, options);
+  Lua.writeFunction("rpzPrimary", [&lci, &delayedThreads](const boost::variant<string, std::vector<std::pair<int, string> > >& primaries_, const string& zoneName, boost::optional<rpzOptions_t> options) {
+    rpzPrimary(lci, delayedThreads, primaries_, zoneName, options);
       });
 
   typedef vector<pair<int,boost::variant<string, vector<pair<int, string> > > > > argvec_t;
@@ -618,9 +619,9 @@ void loadRecursorLuaConfig(const std::string& fname, luaConfigDelayedThreads& de
 
 void startLuaConfigDelayedThreads(const luaConfigDelayedThreads& delayedThreads, uint64_t generation)
 {
-  for (const auto& rpzMaster : delayedThreads.rpzMasterThreads) {
+  for (const auto& rpzPrimary : delayedThreads.rpzPrimaryThreads) {
     try {
-      std::thread t(RPZIXFRTracker, std::get<0>(rpzMaster), std::get<1>(rpzMaster), std::get<2>(rpzMaster), std::get<3>(rpzMaster), std::get<4>(rpzMaster), std::get<5>(rpzMaster), std::get<6>(rpzMaster) * 1024 * 1024, std::get<7>(rpzMaster), std::get<8>(rpzMaster), std::get<9>(rpzMaster), std::get<10>(rpzMaster), std::get<11>(rpzMaster), generation);
+      std::thread t(RPZIXFRTracker, std::get<0>(rpzPrimary), std::get<1>(rpzPrimary), std::get<2>(rpzPrimary), std::get<3>(rpzPrimary), std::get<4>(rpzPrimary), std::get<5>(rpzPrimary), std::get<6>(rpzPrimary) * 1024 * 1024, std::get<7>(rpzPrimary), std::get<8>(rpzPrimary), std::get<9>(rpzPrimary), std::get<10>(rpzPrimary), std::get<11>(rpzPrimary), generation);
       t.detach();
     }
     catch(const std::exception& e) {
index 0ffff69c019137180e1398a684cd66e06890469b..4b1fc27dd272fd362bd65e92004391c7fd27f301 100644 (file)
@@ -85,7 +85,7 @@ extern GlobalStateHolder<LuaConfigItems> g_luaconfs;
 
 struct luaConfigDelayedThreads
 {
-  std::vector<std::tuple<std::vector<ComboAddress>, boost::optional<DNSFilterEngine::Policy>, bool, uint32_t, size_t, TSIGTriplet, size_t, ComboAddress, uint16_t, uint32_t, std::shared_ptr<SOARecordContent>, std::string> > rpzMasterThreads;
+  std::vector<std::tuple<std::vector<ComboAddress>, boost::optional<DNSFilterEngine::Policy>, bool, uint32_t, size_t, TSIGTriplet, size_t, ComboAddress, uint16_t, uint32_t, std::shared_ptr<SOARecordContent>, std::string> > rpzPrimaryThreads;
 };
 
 void loadRecursorLuaConfig(const std::string& fname, luaConfigDelayedThreads& delayedThreads);
index c4a1b2fdc85e92339377391a4bfd10949e06dc09..e7e894010f347f7529bc64dcd4517f62ac4f2cab 100644 (file)
@@ -194,7 +194,7 @@ static void registerCounter64Stat(const std::string& name, const oid statOID[],
 
   s_statsMap[statOID[statOIDLength - 1]] = name.c_str();
   netsnmp_register_scalar(netsnmp_create_handler_registration(name.c_str(),
-                                                              isStatBlacklisted(StatComponent::SNMP, name) ?
+                                                              isStatDisabled(StatComponent::SNMP, name) ?
                                                               handleDisabledCounter64Stats : handleCounter64Stats,
                                                               statOID,
                                                               statOIDLength,
index c803fa549539654c9ba44f2443ef5549479cd2e7..38c63a95c4ea4091d8c1b5434810f5f2fce42d5a 100644 (file)
@@ -28,7 +28,7 @@ class RecursorSNMPAgent;
 class RecursorSNMPAgent: public SNMPAgent
 {
 public:
-  RecursorSNMPAgent(const std::string& name, const std::string& masterSocket);
+  RecursorSNMPAgent(const std::string& name, const std::string& daemonSocket);
   bool sendCustomTrap(const std::string& reason);
 };
 
index d6ca9fbcc27c5ea6209435c9f12e5ea4b8695806..287a793832c4aaa435460e1f3c0ca67713fc2ed5 100644 (file)
@@ -109,9 +109,9 @@ std::vector<ComboAddress>* pleaseGetTimeouts();
 DNSName getRegisteredName(const DNSName& dom);
 std::atomic<unsigned long>* getDynMetric(const std::string& str, const std::string& prometheusName);
 boost::optional<uint64_t> getStatByName(const std::string& name);
-bool isStatBlacklisted(StatComponent component, const std::string& name);
-void blacklistStat(StatComponent component, const string& name);
-void blacklistStats(StatComponent component, const string& stats);
+bool isStatDisabled(StatComponent component, const std::string& name);
+void disableStat(StatComponent component, const string& name);
+void disableStats(StatComponent component, const string& stats);
 
 void registerAllStats();
 
index 08ca90b8a91e958b3bf82d98e93c1d2c9e1f50b5..43971c2394e3a7608ffe1caa9377ba275f5683bb 100644 (file)
@@ -53,24 +53,24 @@ struct dynmetrics {
 
 static map<string, dynmetrics> d_dynmetrics;
 
-static std::map<StatComponent, std::set<std::string>> s_blacklistedStats;
+static std::map<StatComponent, std::set<std::string>> s_disabledStats;
 
-bool isStatBlacklisted(StatComponent component, const string& name)
+bool isStatDisabled(StatComponent component, const string& name)
 {
-  return s_blacklistedStats[component].count(name) != 0;
+  return s_disabledStats[component].count(name) != 0;
 }
 
-void blacklistStat(StatComponent component, const string& name)
+void disableStat(StatComponent component, const string& name)
 {
-  s_blacklistedStats[component].insert(name);
+  s_disabledStats[component].insert(name);
 }
 
-void blacklistStats(StatComponent component, const string& stats)
+void disableStats(StatComponent component, const string& stats)
 {
-  std::vector<std::string> blacklistedStats;
-  stringtok(blacklistedStats, stats, ", ");
-  auto& map = s_blacklistedStats[component];
-  for (const auto &st : blacklistedStats) {
+  std::vector<std::string> disabledStats;
+  stringtok(disabledStats, stats, ", ");
+  auto& map = s_disabledStats[component];
+  for (const auto &st : disabledStats) {
     map.insert(st);
   }
 }
@@ -144,21 +144,21 @@ boost::optional<uint64_t> getStatByName(const std::string& name)
 StatsMap getAllStatsMap(StatComponent component)
 {
   StatsMap ret;
-  const auto& blacklistMap = s_blacklistedStats.at(component);
+  const auto& disabledlistMap = s_disabledStats.at(component);
 
   for(const auto& the32bits :  d_get32bitpointers) {
-    if (blacklistMap.count(the32bits.first) == 0) {
+    if (disabledlistMap.count(the32bits.first) == 0) {
       ret.insert(make_pair(the32bits.first, StatsMapEntry{getPrometheusName(the32bits.first), std::to_string(*the32bits.second)}));
     }
   }
   for(const auto& atomic :  d_getatomics) {
-    if (blacklistMap.count(atomic.first) == 0) {
+    if (disabledlistMap.count(atomic.first) == 0) {
       ret.insert(make_pair(atomic.first, StatsMapEntry{getPrometheusName(atomic.first), std::to_string(atomic.second->load())}));
     }
   }
 
   for(const auto& the64bitmembers :  d_get64bitmembers) {
-    if (blacklistMap.count(the64bitmembers.first) == 0) {
+    if (disabledlistMap.count(the64bitmembers.first) == 0) {
       ret.insert(make_pair(the64bitmembers.first, StatsMapEntry{getPrometheusName(the64bitmembers.first), std::to_string(the64bitmembers.second())}));
     }
   }
@@ -166,7 +166,7 @@ StatsMap getAllStatsMap(StatComponent component)
   {
     std::lock_guard<std::mutex> l(d_dynmetricslock);
     for(const auto& a : d_dynmetrics) {
-      if (blacklistMap.count(a.first) == 0) {
+      if (disabledlistMap.count(a.first) == 0) {
         ret.insert(make_pair(a.first, StatsMapEntry{a.second.d_prometheusName, std::to_string(*a.second.d_ptr)}));
       }
     }
index 6c87e7d91e3f9457c56eb94ea88a689155b6176c..7d521ca6a0728d7ba37a2b931bb26a102c1fd589 100644 (file)
@@ -186,17 +186,17 @@ static void RPZRecordToPolicy(const DNSRecord& dr, std::shared_ptr<DNSFilterEngi
   }
 }
 
-static shared_ptr<SOARecordContent> loadRPZFromServer(const ComboAddress& master, const DNSName& zoneName, std::shared_ptr<DNSFilterEngine::Zone> zone, boost::optional<DNSFilterEngine::Policy> defpol, bool defpolOverrideLocal, uint32_t maxTTL, const TSIGTriplet& tt, size_t maxReceivedBytes, const ComboAddress& localAddress, uint16_t axfrTimeout)
+static shared_ptr<SOARecordContent> loadRPZFromServer(const ComboAddress& primary, const DNSName& zoneName, std::shared_ptr<DNSFilterEngine::Zone> zone, boost::optional<DNSFilterEngine::Policy> defpol, bool defpolOverrideLocal, uint32_t maxTTL, const TSIGTriplet& tt, size_t maxReceivedBytes, const ComboAddress& localAddress, uint16_t axfrTimeout)
 {
-  g_log<<Logger::Warning<<"Loading RPZ zone '"<<zoneName<<"' from "<<master.toStringWithPort()<<endl;
+  g_log<<Logger::Warning<<"Loading RPZ zone '"<<zoneName<<"' from "<<primary.toStringWithPort()<<endl;
   if(!tt.name.empty())
     g_log<<Logger::Warning<<"With TSIG key '"<<tt.name<<"' of algorithm '"<<tt.algo<<"'"<<endl;
 
   ComboAddress local(localAddress);
   if (local == ComboAddress())
-    local = pdns::getQueryLocalAddress(master.sin4.sin_family, 0);
+    local = pdns::getQueryLocalAddress(primary.sin4.sin_family, 0);
 
-  AXFRRetriever axfr(master, zoneName, tt, &local, maxReceivedBytes, axfrTimeout);
+  AXFRRetriever axfr(primary, zoneName, tt, &local, maxReceivedBytes, axfrTimeout);
   unsigned int nrecords=0;
   Resolver::res_t nop;
   vector<DNSRecord> chunk;
@@ -350,7 +350,7 @@ static bool dumpZoneToDisk(const DNSName& zoneName, const std::shared_ptr<DNSFil
   return true;
 }
 
-void RPZIXFRTracker(const std::vector<ComboAddress>& masters, boost::optional<DNSFilterEngine::Policy> defpol, bool defpolOverrideLocal, uint32_t maxTTL, size_t zoneIdx, const TSIGTriplet& tt, size_t maxReceivedBytes, const ComboAddress& localAddress, const uint16_t axfrTimeout, const uint32_t refreshFromConf, std::shared_ptr<SOARecordContent> sr, std::string dumpZoneFileName, uint64_t configGeneration)
+void RPZIXFRTracker(const std::vector<ComboAddress>& primaries, boost::optional<DNSFilterEngine::Policy> defpol, bool defpolOverrideLocal, uint32_t maxTTL, size_t zoneIdx, const TSIGTriplet& tt, size_t maxReceivedBytes, const ComboAddress& localAddress, const uint16_t axfrTimeout, const uint32_t refreshFromConf, std::shared_ptr<SOARecordContent> sr, std::string dumpZoneFileName, uint64_t configGeneration)
 {
   setThreadName("pdns-r/RPZIXFR");
   bool isPreloaded = sr != nullptr;
@@ -373,9 +373,9 @@ void RPZIXFRTracker(const std::vector<ComboAddress>& masters, boost::optional<DN
 
     /* full copy, as promised */
     std::shared_ptr<DNSFilterEngine::Zone> newZone = std::make_shared<DNSFilterEngine::Zone>(*oldZone);
-    for (const auto& master : masters) {
+    for (const auto& primary : primaries) {
       try {
-        sr = loadRPZFromServer(master, zoneName, newZone, defpol, defpolOverrideLocal, maxTTL, tt, maxReceivedBytes, localAddress, axfrTimeout);
+        sr = loadRPZFromServer(primary, zoneName, newZone, defpol, defpolOverrideLocal, maxTTL, tt, maxReceivedBytes, localAddress, axfrTimeout);
         newZone->setSerial(sr->d_st.serial);
         newZone->setRefresh(sr->d_st.refresh);
         refresh = std::max(refreshFromConf ? refreshFromConf : newZone->getRefresh(), 1U);
@@ -389,15 +389,15 @@ void RPZIXFRTracker(const std::vector<ComboAddress>& masters, boost::optional<DN
           dumpZoneToDisk(zoneName, newZone, dumpZoneFileName);
         }
 
-        /* no need to try another master */
+        /* no need to try another primary */
         break;
       }
       catch(const std::exception& e) {
-        g_log<<Logger::Warning<<"Unable to load RPZ zone '"<<zoneName<<"' from '"<<master<<"': '"<<e.what()<<"'. (Will try again in "<<refresh<<" seconds...)"<<endl;
+        g_log<<Logger::Warning<<"Unable to load RPZ zone '"<<zoneName<<"' from '"<<primary<<"': '"<<e.what()<<"'. (Will try again in "<<refresh<<" seconds...)"<<endl;
         incRPZFailedTransfers(polName);
       }
       catch(const PDNSException& e) {
-        g_log<<Logger::Warning<<"Unable to load RPZ zone '"<<zoneName<<"' from '"<<master<<"': '"<<e.reason<<"'. (Will try again in "<<refresh<<" seconds...)"<<endl;
+        g_log<<Logger::Warning<<"Unable to load RPZ zone '"<<zoneName<<"' from '"<<primary<<"': '"<<e.reason<<"'. (Will try again in "<<refresh<<" seconds...)"<<endl;
         incRPZFailedTransfers(polName);
       }
     }
@@ -429,18 +429,18 @@ void RPZIXFRTracker(const std::vector<ComboAddress>& masters, boost::optional<DN
     }
 
     vector<pair<vector<DNSRecord>, vector<DNSRecord> > > deltas;
-    for (const auto& master : masters) {
-      g_log<<Logger::Info<<"Getting IXFR deltas for "<<zoneName<<" from "<<master.toStringWithPort()<<", our serial: "<<getRR<SOARecordContent>(dr)->d_st.serial<<endl;
+    for (const auto& primary : primaries) {
+      g_log<<Logger::Info<<"Getting IXFR deltas for "<<zoneName<<" from "<<primary.toStringWithPort()<<", our serial: "<<getRR<SOARecordContent>(dr)->d_st.serial<<endl;
 
       ComboAddress local(localAddress);
       if (local == ComboAddress()) {
-        local = pdns::getQueryLocalAddress(master.sin4.sin_family, 0);
+        local = pdns::getQueryLocalAddress(primary.sin4.sin_family, 0);
       }
 
       try {
-        deltas = getIXFRDeltas(master, zoneName, dr, tt, &local, maxReceivedBytes);
+        deltas = getIXFRDeltas(primary, zoneName, dr, tt, &local, maxReceivedBytes);
 
-        /* no need to try another master */
+        /* no need to try another primary */
         break;
       } catch(const std::runtime_error& e ){
         g_log<<Logger::Warning<<e.what()<<endl;
index c11156f6dd9ca78e0b8b7726865f31951c89b1f9..85e10d30a4357aaa3907eb0224a04250648bd3f9 100644 (file)
@@ -27,7 +27,7 @@
 extern bool g_logRPZChanges;
 
 std::shared_ptr<SOARecordContent> loadRPZFromFile(const std::string& fname, std::shared_ptr<DNSFilterEngine::Zone> zone, boost::optional<DNSFilterEngine::Policy> defpol, bool defpolOverrideLocal, uint32_t maxTTL);
-void RPZIXFRTracker(const std::vector<ComboAddress>& masters, boost::optional<DNSFilterEngine::Policy> defpol, bool defpolOverrideLocal, uint32_t maxTTL, size_t zoneIdx, const TSIGTriplet& tt, size_t maxReceivedBytes, const ComboAddress& localAddress, const uint16_t axfrTimeout, const uint32_t reloadFromConf, shared_ptr<SOARecordContent> sr, std::string dumpZoneFileName, uint64_t configGeneration);
+void RPZIXFRTracker(const std::vector<ComboAddress>& primaries, boost::optional<DNSFilterEngine::Policy> defpol, bool defpolOverrideLocal, uint32_t maxTTL, size_t zoneIdx, const TSIGTriplet& tt, size_t maxReceivedBytes, const ComboAddress& localAddress, const uint16_t axfrTimeout, const uint32_t reloadFromConf, shared_ptr<SOARecordContent> sr, std::string dumpZoneFileName, uint64_t configGeneration);
 
 struct rpzStats
 {
index 9b39a588ac0dbedb9c4de70503118a0ed4caf569..c6e54e50ccc6ce3cb9ca201d4733b0b549011f8c 100644 (file)
@@ -3670,7 +3670,7 @@ bool SyncRes::processRecords(const std::string& prefix, const DNSName& qname, co
         ne.d_ttd = d_now.tv_sec + lowestTTL;
 
         if (!wasVariable()) {
-          if (qtype.getCode()) {  // prevents us from blacking out a whole domain
+          if (qtype.getCode()) {  // prevents us from NXDOMAIN'ing a whole domain
             g_negCache->add(ne);
           }
         }
@@ -4303,10 +4303,10 @@ boost::optional<Netmask> SyncRes::getEDNSSubnetMask(const DNSName& dn, const Com
   return boost::none;
 }
 
-void SyncRes::parseEDNSSubnetWhitelist(const std::string& wlist)
+void SyncRes::parseEDNSSubnetAllowlist(const std::string& alist)
 {
   vector<string> parts;
-  stringtok(parts, wlist, ",; ");
+  stringtok(parts, alist, ",; ");
   for(const auto& a : parts) {
     try {
       s_ednsremotesubnets.addMask(Netmask(a));
index 1a32e196f847b95cde287a7a5e495717be71f113..6c4f8d2668d1a0e6b29e286182374a82bc1a8000 100644 (file)
@@ -447,7 +447,7 @@ public:
   {
     s_dontQuery = nullptr;
   }
-  static void parseEDNSSubnetWhitelist(const std::string& wlist);
+  static void parseEDNSSubnetAllowlist(const std::string& alist);
   static void parseEDNSSubnetAddFor(const std::string& subnetlist);
   static void addEDNSLocalSubnet(const std::string& subnet)
   {
index 2ed46e5c5e02a1b81a74cab380381aec3c3f15e3..25a68af64da9a7a323e61116f35233871e326ea8 100644 (file)
@@ -439,8 +439,8 @@ static void prometheusMetrics(HttpRequest *req, HttpResponse *resp) {
 
     std::ostringstream output;
 
-    // Argument controls blacklisting of any stats. So
-    // stats-api-blacklist will be used to block returned stats.
+    // Argument controls disabling of any stats. So
+    // stats-api-disabled-list will be used to block returned stats.
     auto varmap = getAllStatsMap(StatComponent::API);
     for (const auto& tup : varmap) {
         std::string metricName = tup.first;