}
//! 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
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;