From 639797e5924b42764711b69b09e48ee07ed3d683 Mon Sep 17 00:00:00 2001 From: Brent Stapleton Date: Wed, 22 Aug 2018 09:45:08 -0700 Subject: uhd: udp: 'all_matching' endpoint resolution By default, Boost.ASIO uses 'address_configured' mode for UDP endpoint resolution, which "only return[s] IPv4 addresses if a non-loopback IPv4 address is configured for the system". This changes the resolver to use 'all_matching', which instead returns "all matching IPv6 and IPv4 addresses". --- host/lib/transport/udp_simple.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'host/lib') diff --git a/host/lib/transport/udp_simple.cpp b/host/lib/transport/udp_simple.cpp index 27d8ba29f..e3936afc2 100644 --- a/host/lib/transport/udp_simple.cpp +++ b/host/lib/transport/udp_simple.cpp @@ -25,7 +25,8 @@ public: //resolve the address asio::ip::udp::resolver resolver(_io_service); - asio::ip::udp::resolver::query query(asio::ip::udp::v4(), addr, port); + asio::ip::udp::resolver::query query(asio::ip::udp::v4(), addr, port, + asio::ip::resolver_query_base::all_matching); _send_endpoint = *resolver.resolve(query); //create and open the socket -- cgit v1.2.3