Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

udp: Add use_original_src_ip feature on udp proxy #12586

Merged
merged 45 commits into from
Aug 26, 2020
Merged
Show file tree
Hide file tree
Changes from 41 commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
2e6e73c
[WIP] Add use_original_src_ip feature on udp proxy
Aug 6, 2020
3b35051
Change the io_handle to socket
Aug 11, 2020
2f44796
Fix ci
Aug 11, 2020
af44b31
Test local_ip is nullptr case
Aug 11, 2020
c56a26c
More clarify documents
Aug 12, 2020
f059b0c
For suppression of clang-tidy NewDeleteLeaks
Aug 12, 2020
247bed0
Use socket option interfaces
Aug 12, 2020
020bf24
Add more information in documents
Aug 13, 2020
4a4bf65
Check if the platform supports ip tranparent at configuration loading…
Aug 13, 2020
978fbfb
More document details
Aug 14, 2020
3e72fa8
More tests
Aug 14, 2020
4bb08e6
Fix format
Aug 14, 2020
ab200f7
Kick CI
Aug 14, 2020
6c8bd24
Merge branch 'master' into add_no_snat_option
Aug 14, 2020
ec6b11a
Fix ci
Aug 15, 2020
1cc9a20
Fix typo
Aug 15, 2020
a12ce73
Fix docs
Aug 17, 2020
9810807
Kick CI
Aug 17, 2020
5970e16
Address review comments
Aug 18, 2020
3cb7396
Merge branch 'master' into add_no_snat_option
Aug 19, 2020
92b552d
Move socket mock to new files
Aug 19, 2020
66b36b0
Merge branch 'master' into add_no_snat_option
Aug 19, 2020
2fc489c
Fix ci
Aug 19, 2020
a788b97
Merge branch 'master' into add_no_snat_option
Aug 19, 2020
2a85187
Address some comments
Aug 20, 2020
8ce1b01
Fix some comments
Aug 20, 2020
26d6c22
Kick CI
Aug 20, 2020
f6d63fc
Kick CI
Aug 20, 2020
b7ea0c2
Kick CI
Aug 20, 2020
5622a16
Remove unused code and fix log
Aug 21, 2020
6dafbaf
Merge branch 'master' into add_no_snat_option
Aug 21, 2020
93fdf3e
Fix format
Aug 21, 2020
e61065d
Remove mockIoHandle
Aug 21, 2020
ced9157
Do not fail if ipv6 not supported when listener's ip is ipv4
Aug 21, 2020
68407ec
Fix ci
Aug 21, 2020
5c7ae9f
Address more comments
Aug 21, 2020
a57bcdc
Refactor tests
Aug 22, 2020
643cfc3
Merge branch 'master' into add_no_snat_option
Aug 22, 2020
5a30f34
Fix format
Aug 22, 2020
10bb89d
Fix release note
Aug 22, 2020
19f0dc4
Merge branch 'master' into add_no_snat_option
Aug 23, 2020
1aba2e4
Revert "Do not fail if ipv6 not supported when listener's ip is ipv4"
Aug 25, 2020
f0bbb04
Fix document
Aug 26, 2020
13c311f
Merge branch 'master' into add_no_snat_option
Aug 26, 2020
56316b7
Fix format
Aug 26, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions api/envoy/extensions/filters/udp/udp_proxy/v3/udp_proxy.proto
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,19 @@ message UdpProxyConfig {
// The idle timeout for sessions. Idle is defined as no datagrams between received or sent by
// the session. The default if not specified is 1 minute.
google.protobuf.Duration idle_timeout = 3;

// Use the remote downstream IP address as the sender IP address when sending packets to upstream hosts.
// This option requires Envoy to be run with the *CAP_NET_ADMIN* capability on Linux.
// This option does not preserve the remote downstream port.
// If this option is enabled, the IP address of sent datagrams will be changed to the remote downstream IP address.
// This means that Envoy will not receive packets that are sent by upstream hosts because the upstream hosts
// will send the packets with the remote downstream IP address as the destination. All packets will be routed
// to the remote downstream directly if there are route rules on the upstream host side.
// There are two options to return the packets back to the remote downstream.
// The first one is to use DSR (Direct Server Return).
// The other one is to configure routing rules on the upstream hosts to forward
// all packets back to Envoy and configure iptables rules on the host running Envoy to
// forward all packets from upstream hosts to the Envoy process so that Envoy can forward the packets to the downstream.
// If the platform does not support this option, Envoy will raise a configuration error.
bool use_original_src_ip = 4;
}
4 changes: 4 additions & 0 deletions docs/root/configuration/listeners/udp_filters/udp_proxy.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ Each session is index by the 4-tuple consisting of source IP/port and local IP/p
datagram is received on. Sessions last until the :ref:`idle timeout
<envoy_v3_api_field_extensions.filters.udp.udp_proxy.v3.UdpProxyConfig.idle_timeout>` is reached.

The UDP proxy listener filter also can operate as a *transparent* proxy if the
mattklein123 marked this conversation as resolved.
Show resolved Hide resolved
:ref:`use_original_src_ip <envoy_v3_api_msg_extensions.filters.udp.udp_proxy.v3.UdpProxyConfig>`
field is set. But please keep in mind that it does not forward the port to upstreams. It forwards only the IP address to upstreams.

Load balancing and unhealthy host handling
------------------------------------------

Expand Down
1 change: 1 addition & 0 deletions docs/root/version_history/current.rst
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ New Features
* tap: added :ref:`generic body matcher<envoy_v3_api_msg_config.tap.v3.HttpGenericBodyMatch>` to scan http requests and responses for text or hex patterns.
* tcp: switched the TCP connection pool to the new "shared" connection pool, sharing a common code base with HTTP and HTTP/2. Any unexpected behavioral changes can be temporarily reverted by setting `envoy.reloadable_features.new_tcp_connection_pool` to false.
* tcp_proxy: allow earlier network filters to set metadataMatchCriteria on the connection StreamInfo to influence load balancing.
* udp_proxy: added :ref:`use_original_src_ip <envoy_v3_api_msg_extensions.filters.udp.udp_proxy.v3.UdpProxyConfig>` option to replicate the downstream remote address of the packets on the upstream side of Envoy. It is similar to :ref:`original source filter <envoy_v3_api_msg_extensions.filters.listener.original_src.v3.OriginalSrc>`.
* watchdog: support randomizing the watchdog's kill timeout to prevent synchronized kills via a maximium jitter parameter :ref:`max_kill_timeout_jitter<envoy_v3_api_field_config.bootstrap.v3.Watchdog.max_kill_timeout_jitter>`.
* watchdog: supports an extension point where actions can be registered to fire on watchdog events such as miss, megamiss, kill and multikill. See ref:`watchdog actions<envoy_v3_api_field_config.bootstrap.v3.Watchdog.actions>`.
* xds: added :ref:`extension config discovery<envoy_v3_api_msg_config.core.v3.ExtensionConfigSource>` support for HTTP filters.
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions include/envoy/api/os_sys_calls.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,13 @@ class OsSysCalls {
*/
virtual bool supportsUdpGso() const PURE;

/**
* return true if the OS support IP_TRANSPARENT or IPV6_TRANSPARENT options
* @param check_v4only If it is true, check if the OS supports only IP_TRANSPARENT option, else
* check if the OS supports IPV6_TRANSPARENT option as well.
*/
virtual bool supportsIpTransparent(bool check_v4only) const PURE;

/**
* Release all resources allocated for fd.
* @return zero on success, -1 returned otherwise.
Expand Down
43 changes: 43 additions & 0 deletions source/common/api/posix/os_sys_calls_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,49 @@ bool OsSysCallsImpl::supportsUdpGso() const {
#endif
}

bool OsSysCallsImpl::supportsIpTransparent(bool check_v4only) const {
#if !defined(__linux__)
UNREFERENCED_PARAMETER(check_v4only);
return false;
#else
// The linux kernel supports IP_TRANSPARENT by following patch(starting from v2.6.28) :
// https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/net/ipv4/ip_sockglue.c?id=f5715aea4564f233767ea1d944b2637a5fd7cd2e
//
// The linux kernel supports IPV6_TRANSPARENT by following patch(starting from v2.6.37) :
// https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/net/ipv6/ipv6_sockglue.c?id=6c46862280c5f55eda7750391bc65cd7e08c7535
//
// So, almost recent linux kernel supports both IP_TRANSPARENT and IPV6_TRANSPARENT options.
mattklein123 marked this conversation as resolved.
Show resolved Hide resolved
//
// And these socket options need CAP_NET_ADMIN capability to be applied.
// The CAP_NET_ADMIN capability should be applied by root user before call this function.
static const bool is_supported = [check_v4only] {
// Check ipv4 case
int fd = ::socket(AF_INET, SOCK_DGRAM | SOCK_NONBLOCK, IPPROTO_UDP);
if (fd < 0) {
return false;
}
int val = 1;
bool result = (0 == ::setsockopt(fd, IPPROTO_IP, IP_TRANSPARENT, &val, sizeof(val)));
::close(fd);
if (!result) {
return false;
}
if (!check_v4only) {
// Check ipv6 case
fd = ::socket(AF_INET6, SOCK_DGRAM | SOCK_NONBLOCK, IPPROTO_UDP);
if (fd < 0) {
return false;
}
val = 1;
result = (0 == ::setsockopt(fd, IPPROTO_IPV6, IPV6_TRANSPARENT, &val, sizeof(val)));
::close(fd);
}
return result;
}();
return is_supported;
#endif
}

SysCallIntResult OsSysCallsImpl::ftruncate(int fd, off_t length) {
const int rc = ::ftruncate(fd, length);
return {rc, rc != -1 ? 0 : errno};
Expand Down
1 change: 1 addition & 0 deletions source/common/api/posix/os_sys_calls_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ class OsSysCallsImpl : public OsSysCalls {
bool supportsMmsg() const override;
bool supportsUdpGro() const override;
bool supportsUdpGso() const override;
bool supportsIpTransparent(bool check_v4only) const override;
SysCallIntResult close(os_fd_t fd) override;
SysCallIntResult ftruncate(int fd, off_t length) override;
SysCallPtrResult mmap(void* addr, size_t length, int prot, int flags, int fd,
Expand Down
5 changes: 5 additions & 0 deletions source/common/api/win32/os_sys_calls_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,11 @@ bool OsSysCallsImpl::supportsUdpGso() const {
return false;
}

bool OsSysCallsImpl::supportsIpTransparent(bool) const {
// Windows doesn't support it.
return false;
}

SysCallIntResult OsSysCallsImpl::ftruncate(int fd, off_t length) {
const int rc = ::_chsize_s(fd, length);
return {rc, rc == 0 ? 0 : errno};
Expand Down
1 change: 1 addition & 0 deletions source/common/api/win32/os_sys_calls_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ class OsSysCallsImpl : public OsSysCalls {
bool supportsMmsg() const override;
bool supportsUdpGro() const override;
bool supportsUdpGso() const override;
bool supportsIpTransparent(bool check_v4only) const override;
SysCallIntResult close(os_fd_t fd) override;
SysCallIntResult ftruncate(int fd, off_t length) override;
SysCallPtrResult mmap(void* addr, size_t length, int prot, int flags, int fd,
Expand Down
4 changes: 4 additions & 0 deletions source/extensions/filters/udp/udp_proxy/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,13 @@ envoy_cc_library(
deps = [
"//include/envoy/event:file_event_interface",
"//include/envoy/event:timer_interface",
"//include/envoy/network:exception_interface",
"//include/envoy/network:filter_interface",
"//include/envoy/network:listener_interface",
"//include/envoy/upstream:cluster_manager_interface",
"//source/common/api:os_sys_calls_lib",
"//source/common/network:socket_lib",
"//source/common/network:socket_option_factory_lib",
"//source/common/network:utility_lib",
"@envoy_api//envoy/extensions/filters/udp/udp_proxy/v3:pkg_cc_proto",
],
Expand Down
41 changes: 34 additions & 7 deletions source/extensions/filters/udp/udp_proxy/udp_proxy_filter.cc
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
#include "extensions/filters/udp/udp_proxy/udp_proxy_filter.h"

#include "envoy/network/exception.h"
#include "envoy/network/listener.h"

#include "common/network/socket_option_factory.h"

namespace Envoy {
namespace Extensions {
namespace UdpFilters {
Expand All @@ -12,6 +15,16 @@ UdpProxyFilter::UdpProxyFilter(Network::UdpReadFilterCallbacks& callbacks,
: UdpListenerReadFilter(callbacks), config_(config),
cluster_update_callbacks_(
config->clusterManager().addThreadLocalClusterUpdateCallbacks(*this)) {
bool check_v4only =
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: const

callbacks.udpListener().localAddress()->ip()->version() == Network::Address::IpVersion::v4;
if (config_->usingOriginalSrcIp() &&
!Api::OsSysCallsSingleton::get().supportsIpTransparent(check_v4only)) {
throw Network::CreateListenerException(
Copy link
Contributor Author

@chadr123 chadr123 Aug 21, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mattklein123 @danzh2010 I have a question. Is it better to throw an exception or do panic?
I'm not sure which is better option.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should actually be checked inside the the config creation for the UDP proxy, not here on filter creation. This way it will be checked in config load. In that case you can throw an EnvoyException and it will be a normal error. You should also add tests for this case.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok. I have a question. Originally, I would like to check it on config creation for the UDP proxy. But I could not find how to know the user set the listener's IP as IPv4 or IPv6 in this config creation. That is why I change the checking from config creation to filter creation. Could you give your advise about that? Should I add one more option for that? Or? :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry I think I missed that. Why do we have to check that? Just because we don't know whether v4 or v6 is working until we check it? Can we just check both? If we need to actually check this at runtime I don't think we can actually raise an exception here. I think we need to just drop the datagram and have a stat or something.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, it is added due to following @danzh2010 's comment : #12586 (comment)

So, I check more linux kernel's implementation, and the ipv6 feature can be disabled during kernel compilation and can be a kernel module so it can be loaded after booting and can be disabled by grub' configuration even if the linux kernel is compiled with ipv6 feature.

I think that there is a advantage that disable the ipv6 on modern common linux distribution.
That is only memory usage but it is not much issue because the memory usage of ipv6 is not so much.

What do you think about that? Should I consider ipv6 disabled environment?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or how about revert this change and mention the ipv6 stack should be enabled on linux kernel at this option's manual?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have a strong opinion on this one way or the other, but we just need to make sure the error handling works correctly. If you check this and it can fail at datagram receive time, you need to drop the packet and stat. If you check at config time you can fail then. Up to you as long as we clearly document it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok. Thanks your opinion. :) I will revert previous change and I will mention on document that the ipv6 stack is a mandatory for this new option.

fmt::format("The platform does not support either {} or the envoy is not running with the "
"CAP_NET_ADMIN capability.",
check_v4only ? "IP_TRANSPARENT" : "IPV6_TRANSPARENT"));
}

Upstream::ThreadLocalCluster* cluster = config->clusterManager().get(config->cluster());
if (cluster != nullptr) {
onClusterAddOrUpdate(*cluster);
Expand Down Expand Up @@ -152,13 +165,14 @@ void UdpProxyFilter::ClusterInfo::removeSession(const ActiveSession* session) {
UdpProxyFilter::ActiveSession::ActiveSession(ClusterInfo& cluster,
Network::UdpRecvData::LocalPeerAddresses&& addresses,
const Upstream::HostConstSharedPtr& host)
: cluster_(cluster), addresses_(std::move(addresses)), host_(host),
: cluster_(cluster), use_original_src_ip_(cluster_.filter_.config_->usingOriginalSrcIp()),
addresses_(std::move(addresses)), host_(host),
idle_timer_(cluster.filter_.read_callbacks_->udpListener().dispatcher().createTimer(
[this] { onIdleTimer(); })),
// NOTE: The socket call can only fail due to memory/fd exhaustion. No local ephemeral port
// is bound until the first packet is sent to the upstream host.
io_handle_(cluster.filter_.createIoHandle(host)),
socket_event_(io_handle_->createFileEvent(
socket_(cluster.filter_.createSocket(host)),
socket_event_(socket_->ioHandle().createFileEvent(
cluster.filter_.read_callbacks_->udpListener().dispatcher(),
[this](uint32_t) { onReadReady(); }, Event::PlatformDefaultTriggerType,
Event::FileReadyType::Read)) {
Expand All @@ -172,6 +186,17 @@ UdpProxyFilter::ActiveSession::ActiveSession(ClusterInfo& cluster,
.connections()
.inc();

if (use_original_src_ip_) {
const Network::Socket::OptionsSharedPtr socket_options =
Network::SocketOptionFactory::buildIpTransparentOptions();
const bool ok = Network::Socket::applyOptions(
socket_options, *socket_, envoy::config::core::v3::SocketOption::STATE_PREBIND);
mattklein123 marked this conversation as resolved.
Show resolved Hide resolved

RELEASE_ASSERT(ok, "Should never occur!");
ENVOY_LOG(debug, "The original src is enabled for address {}.",
addresses_.peer_->asStringView());
}

// TODO(mattklein123): Enable dropped packets socket option. In general the Socket abstraction
// does not work well right now for client sockets. It's too heavy weight and is aimed at listener
// sockets. We need to figure out how to either refactor Socket into something that works better
Expand Down Expand Up @@ -204,7 +229,7 @@ void UdpProxyFilter::ActiveSession::onReadReady() {
// not trying to populate the local address for received packets.
uint32_t packets_dropped = 0;
const Api::IoErrorPtr result = Network::Utility::readPacketsFromSocket(
*io_handle_, *addresses_.local_, *this, cluster_.filter_.config_->timeSource(),
socket_->ioHandle(), *addresses_.local_, *this, cluster_.filter_.config_->timeSource(),
packets_dropped);
// TODO(mattklein123): Handle no error when we limit the number of packets read.
if (result->getErrorCode() != Api::IoError::IoErrorCode::Again) {
Expand All @@ -226,10 +251,12 @@ void UdpProxyFilter::ActiveSession::write(const Buffer::Instance& buffer) {

// NOTE: On the first write, a local ephemeral port is bound, and thus this write can fail due to
// port exhaustion.
// NOTE: We do not specify the local IP to use for the sendmsg call. We allow the OS to select
// the right IP based on outbound routing rules.
// NOTE: We do not specify the local IP to use for the sendmsg call if use_original_src_ip_ is not
mattklein123 marked this conversation as resolved.
Show resolved Hide resolved
// set. We allow the OS to select the right IP based on outbound routing rules if
// use_original_src_ip_ is not set, else use downstream peer IP as local IP.
const Network::Address::Ip* local_ip = use_original_src_ip_ ? addresses_.peer_->ip() : nullptr;
Api::IoCallUint64Result rc =
Network::Utility::writeToSocket(*io_handle_, buffer, nullptr, *host_->address());
Network::Utility::writeToSocket(socket_->ioHandle(), buffer, local_ip, *host_->address());
chadr123 marked this conversation as resolved.
Show resolved Hide resolved
if (!rc.ok()) {
cluster_.cluster_stats_.sess_tx_errors_.inc();
} else {
Expand Down
14 changes: 10 additions & 4 deletions source/extensions/filters/udp/udp_proxy/udp_proxy_filter.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
#include "envoy/network/filter.h"
#include "envoy/upstream/cluster_manager.h"

#include "common/api/os_sys_calls_impl.h"
#include "common/network/socket_impl.h"
#include "common/network/socket_interface.h"
#include "common/network/utility.h"

Expand Down Expand Up @@ -63,11 +65,13 @@ class UdpProxyFilterConfig {
const envoy::extensions::filters::udp::udp_proxy::v3::UdpProxyConfig& config)
: cluster_manager_(cluster_manager), time_source_(time_source), cluster_(config.cluster()),
session_timeout_(PROTOBUF_GET_MS_OR_DEFAULT(config, idle_timeout, 60 * 1000)),
use_original_src_ip_(config.use_original_src_ip()),
stats_(generateStats(config.stat_prefix(), root_scope)) {}

const std::string& cluster() const { return cluster_; }
Upstream::ClusterManager& clusterManager() const { return cluster_manager_; }
std::chrono::milliseconds sessionTimeout() const { return session_timeout_; }
bool usingOriginalSrcIp() const { return use_original_src_ip_; }
UdpProxyDownstreamStats& stats() const { return stats_; }
TimeSource& timeSource() const { return time_source_; }

Expand All @@ -83,6 +87,7 @@ class UdpProxyFilterConfig {
TimeSource& time_source_;
const std::string cluster_;
const std::chrono::milliseconds session_timeout_;
const bool use_original_src_ip_;
mutable UdpProxyDownstreamStats stats_;
};

Expand Down Expand Up @@ -135,6 +140,7 @@ class UdpProxyFilter : public Network::UdpListenerReadFilter,
}

ClusterInfo& cluster_;
const bool use_original_src_ip_;
const Network::UdpRecvData::LocalPeerAddresses addresses_;
const Upstream::HostConstSharedPtr host_;
// TODO(mattklein123): Consider replacing an idle timer for each session with a last used
Expand All @@ -143,10 +149,10 @@ class UdpProxyFilter : public Network::UdpListenerReadFilter,
// idle timeouts work so we should consider unifying the implementation if we move to a time
// stamp and scan approach.
const Event::TimerPtr idle_timer_;
// The IO handle is used for writing packets to the selected upstream host as well as receiving
// The socket is used for writing packets to the selected upstream host as well as receiving
// packets from the upstream host. Note that a a local ephemeral port is bound on the first
// write to the upstream host.
const Network::IoHandlePtr io_handle_;
const Network::SocketPtr socket_;
const Event::FileEventPtr socket_event_;
};

Expand Down Expand Up @@ -220,9 +226,9 @@ class UdpProxyFilter : public Network::UdpListenerReadFilter,
host_to_sessions_;
};

virtual Network::IoHandlePtr createIoHandle(const Upstream::HostConstSharedPtr& host) {
virtual Network::SocketPtr createSocket(const Upstream::HostConstSharedPtr& host) {
// Virtual so this can be overridden in unit tests.
return Network::ioHandleForAddr(Network::Socket::Type::Datagram, host->address());
return std::make_unique<Network::SocketImpl>(Network::Socket::Type::Datagram, host->address());
}

// Upstream::ClusterUpdateCallbacks
Expand Down
5 changes: 4 additions & 1 deletion test/extensions/filters/udp/udp_proxy/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,16 @@ envoy_extension_cc_test(
srcs = ["udp_proxy_filter_test.cc"],
extension_name = "envoy.filters.udp_listener.udp_proxy",
deps = [
"//include/envoy/network:exception_interface",
"//source/extensions/filters/udp/udp_proxy:udp_proxy_filter_lib",
"//test/mocks/network:io_handle_mocks",
"//test/mocks/api:api_mocks",
"//test/mocks/network:socket_mocks",
"//test/mocks/upstream:cluster_manager_mocks",
"//test/mocks/upstream:cluster_update_callbacks_handle_mocks",
"//test/mocks/upstream:cluster_update_callbacks_mocks",
"//test/mocks/upstream:host_mocks",
"//test/mocks/upstream:thread_local_cluster_mocks",
"//test/test_common:threadsafe_singleton_injector_lib",
"@envoy_api//envoy/extensions/filters/udp/udp_proxy/v3:pkg_cc_proto",
],
)
Expand Down
Loading