From: Miod Vallat Date: Thu, 24 Apr 2025 08:24:48 +0000 (+0200) Subject: Remove never provided argument of DNSPacket::setRemote(). X-Git-Tag: dnsdist-2.0.0-alpha2~59^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F15460%2Fhead;p=thirdparty%2Fpdns.git Remove never provided argument of DNSPacket::setRemote(). --- diff --git a/pdns/dnspacket.cc b/pdns/dnspacket.cc index fc86f4f6be..f20b7e4400 100644 --- a/pdns/dnspacket.cc +++ b/pdns/dnspacket.cc @@ -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 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 diff --git a/pdns/dnspacket.hh b/pdns/dnspacket.hh index 8a6500133f..7003fb295d 100644 --- a/pdns/dnspacket.hh +++ b/pdns/dnspacket.hh @@ -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 = std::nullopt); + void setRemote(const ComboAddress*); ComboAddress getRemote() const; ComboAddress getInnerRemote() const; // for proxy protocol Netmask getRealRemote() const;