From 6b6bf358a57096a159246d5c327912743d2549bf Mon Sep 17 00:00:00 2001 From: Miod Vallat Date: Thu, 24 Apr 2025 10:24:48 +0200 Subject: [PATCH] Remove never provided argument of DNSPacket::setRemote(). --- pdns/dnspacket.cc | 9 ++------- pdns/dnspacket.hh | 2 +- 2 files changed, 3 insertions(+), 8 deletions(-) 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; -- 2.47.2