]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Fix merge errors
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Mon, 2 Jun 2025 08:50:00 +0000 (10:50 +0200)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Fri, 20 Jun 2025 07:26:15 +0000 (09:26 +0200)
pdns/recursordist/pdns_recursor.cc
pdns/recursordist/rec-snmp.cc
pdns/recursordist/syncres.cc
pdns/recursordist/syncres.hh

index f4530cfc7f9bd837b47012e9b0c73dc3c40410c5..df3a68f7cf9ef74f9d72ae2adb0c21549ad2fae1 100644 (file)
@@ -289,7 +289,8 @@ LWResult::Result asendto(const void* data, size_t len, int /* flags */,
     assert(chain.first->key->domain == pident->domain); // NOLINT
     // don't chain onto existing chained waiter or a chain already processed
     if (chain.first->key->fd > -1 && !chain.first->key->closed) {
-      *fileDesc = -1;
+      chain.first->key->chain.insert(qid); // we can chain
+      *fileDesc = -1;  // gets used in waitEvent / sendEvent later on
       return LWResult::Result::Success;
     }
   }
@@ -2883,17 +2884,6 @@ static void doResends(MT_t::waiters_t::iterator& iter, const std::shared_ptr<Pac
   }
 }
 
-void mthreadSleep(unsigned int jitterMsec)
-{
-  auto neverHappens = std::make_shared<PacketID>();
-  neverHappens->id = dns_random_uint16();
-  neverHappens->type = dns_random_uint16();
-  neverHappens->remote = ComboAddress("100::"); // discard-only
-  neverHappens->remote.setPort(dns_random_uint16());
-  neverHappens->fd = -1;
-  assert(g_multiTasker->waitEvent(neverHappens, nullptr, jitterMsec) != -1); // NOLINT
-}
-
 static bool checkIncomingECSSource(const PacketBuffer& packet, const Netmask& subnet)
 {
   bool foundMatchingECS = false;
index a1a089e794eb87ebcbb6b8befcc1aa9ee0030fd5..a343bbc97b870524e22aad75a8ac8c44befa616a 100644 (file)
@@ -438,6 +438,7 @@ RecursorSNMPAgent::RecursorSNMPAgent(const std::string& name, const std::string&
   registerCounter64Stat("udr-events", udrEventsOID, OID_LENGTH(udrEventsOID));
   registerCounter64Stat("max-chain-length", maxChainLengthOID, OID_LENGTH(maxChainLengthOID));
   registerCounter64Stat("max-chain-weight", maxChainWeightOID, OID_LENGTH(maxChainWeightOID));
+  registerCounter64Stat("chain-limits", chainLimitsOID, OID_LENGTH(chainLimitsOID));
   registerCounter64Stat("tcp-overflow", tcpOverflowOID, OID_LENGTH(tcpOverflowOID));
   registerCounter64Stat("ecs-missing", ecsMissingOID, OID_LENGTH(ecsMissingOID));
 
index 3c7162f484d97d88b6456e5bbcb2ef52d62cd868..e3b3413d87df577dee03826994a59adf96657abc 100644 (file)
@@ -5333,23 +5333,6 @@ void SyncRes::updateQueryCounts(const string& prefix, const DNSName& qname, cons
   }
 }
 
-void SyncRes::incTimeoutStats(const ComboAddress& remoteIP)
-{
-  d_timeouts++;
-  t_Counters.at(rec::Counter::outgoingtimeouts)++;
-
-  if (remoteIP.sin4.sin_family == AF_INET) {
-    t_Counters.at(rec::Counter::outgoing4timeouts)++;
-  }
-  else {
-    t_Counters.at(rec::Counter::outgoing6timeouts)++;
-  }
-
-  if (t_timeouts) {
-    t_timeouts->push_back(remoteIP);
-  }
-}
-
 void SyncRes::checkTotalTime(const DNSName& qname, QType qtype, boost::optional<EDNSExtendedError>& extendedError) const
 {
   if (s_maxtotusec != 0 && d_totUsec > s_maxtotusec) {
index 9eef320a9cdeb3b2b0a99d84ebbe709849c7b335..6ebeb251cf2c98050e9d4a222dc0abc625158d34 100644 (file)
@@ -620,7 +620,6 @@ private:
                   unsigned int depth, const string& prefix, set<GetBestNSAnswer>& beenthere, Context& context, StopAtDelegation* stopAtDelegation,
                   std::map<DNSName, std::vector<ComboAddress>>* fallback);
   void ednsStats(boost::optional<Netmask>& ednsmask, const DNSName& qname, const string& prefix);
-  void incTimeoutStats(const ComboAddress& remoteIP);
   void checkTotalTime(const DNSName& qname, QType qtype, boost::optional<EDNSExtendedError>& extendedError) const;
   bool doResolveAtThisIP(const std::string& prefix, const DNSName& qname, QType qtype, LWResult& lwr, boost::optional<Netmask>& ednsmask, const DNSName& auth, bool sendRDQuery, bool wasForwarded, const DNSName& nsName, const ComboAddress& remoteIP, bool doTCP, bool doDoT, bool& truncated, bool& spoofed, boost::optional<EDNSExtendedError>& extendedError, bool dontThrottle = false);
   bool processAnswer(unsigned int depth, const string& prefix, LWResult& lwr, const DNSName& qname, QType qtype, DNSName& auth, bool wasForwarded, const boost::optional<Netmask>& ednsmask, bool sendRDQuery, NsSet& nameservers, std::vector<DNSRecord>& ret, const DNSFilterEngine& dfe, bool* gotNewServers, int* rcode, vState& state, const ComboAddress& remoteIP);