]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Remove never provided argument of DNSPacket::setRemote(). 15460/head
authorMiod Vallat <miod.vallat@powerdns.com>
Thu, 24 Apr 2025 08:24:48 +0000 (10:24 +0200)
committerMiod Vallat <miod.vallat@powerdns.com>
Thu, 24 Apr 2025 08:24:48 +0000 (10:24 +0200)
pdns/dnspacket.cc
pdns/dnspacket.hh

index fc86f4f6be7eacd7bb4a64adf2959c7002ef5b06..f20b7e4400e5cd2f6e7213d39837d934811bae57 100644 (file)
@@ -673,15 +673,10 @@ void DNSPacket::setMaxReplyLen(int bytes)
 }
 
 //! Use this to set where this packet was received from or should be sent to
-void DNSPacket::setRemote(const ComboAddress *outer, std::optional<ComboAddress> inner)
+void DNSPacket::setRemote(const ComboAddress *outer)
 {
   d_remote=*outer;
-  if (inner) {
-    d_inner_remote=*inner;
-  }
-  else {
-    d_inner_remote.reset();
-  }
+  d_inner_remote.reset();
 }
 
 bool DNSPacket::hasEDNSSubnet() const
index 8a6500133fb1841de8246f6b4d88eb50d6be53a2..7003fb295d433412648ab68690f9aca85b1c7ee8 100644 (file)
@@ -58,7 +58,7 @@ public:
   const string& getString(bool throwsOnTruncation=false); //!< for serialization - just passes the whole packet. If throwsOnTruncation is set, an exception will be raised if the records are too large to fit inside a single DNS payload, instead of setting the TC bit
 
   // address & socket manipulation
-  void setRemote(const ComboAddress*, std::optional<ComboAddress> = std::nullopt);
+  void setRemote(const ComboAddress*);
   ComboAddress getRemote() const;
   ComboAddress getInnerRemote() const; // for proxy protocol
   Netmask getRealRemote() const;