diff --git a/include/envoy/network/listen_socket.h b/include/envoy/network/listen_socket.h index 60fb298f36b38..532ad5c4ba052 100644 --- a/include/envoy/network/listen_socket.h +++ b/include/envoy/network/listen_socket.h @@ -96,7 +96,7 @@ class ConnectionSocket : public virtual Socket { * actually different when passing restored as 'true'. */ virtual void setLocalAddress(const Address::InstanceConstSharedPtr& local_address, - bool restored = false) PURE; + bool restored) PURE; /** * Set the remote address of the socket. diff --git a/source/common/filter/listener/proxy_protocol.cc b/source/common/filter/listener/proxy_protocol.cc index d10415e3e7694..662d7634a1e19 100644 --- a/source/common/filter/listener/proxy_protocol.cc +++ b/source/common/filter/listener/proxy_protocol.cc @@ -110,7 +110,7 @@ void Instance::onReadWorker() { throw EnvoyException("failed to read proxy protocol"); } - socket.setLocalAddress(local_address); + socket.setLocalAddress(local_address, false); socket.setRemoteAddress(remote_address); } diff --git a/source/common/network/connection_impl.cc b/source/common/network/connection_impl.cc index 7bb7b845b6153..1a8d74bab9290 100644 --- a/source/common/network/connection_impl.cc +++ b/source/common/network/connection_impl.cc @@ -579,7 +579,7 @@ void ClientConnectionImpl::connect() { // The local address can only be retrieved for IP connections. Other // types, such as UDS, don't have a notion of a local address. if (socket_->remoteAddress()->type() == Address::Type::Ip) { - socket_->setLocalAddress(Address::addressFromFd(fd())); + socket_->setLocalAddress(Address::addressFromFd(fd()), false); } }