From bdcf587c792d2e1c2a4a769dc9611d03fc6adb2e Mon Sep 17 00:00:00 2001 From: xiphon Date: Sat, 29 Aug 2020 18:07:46 +0000 Subject: net: fix get_tcp_endpoint, boost address_v4 ip in host byte order --- src/net/parse.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/net/parse.cpp') diff --git a/src/net/parse.cpp b/src/net/parse.cpp index 95b22cd44..8a98e941a 100644 --- a/src/net/parse.cpp +++ b/src/net/parse.cpp @@ -138,7 +138,7 @@ namespace net case epee::net_utils::ipv4_network_address::get_type_id(): { const auto &ipv4 = parsed->as(); - result = boost::asio::ip::tcp::endpoint(boost::asio::ip::address_v4(ipv4.ip()), ipv4.port()); + result = boost::asio::ip::tcp::endpoint(boost::asio::ip::address_v4(SWAP32BE(ipv4.ip())), ipv4.port()); break; } case epee::net_utils::ipv6_network_address::get_type_id(): -- cgit v1.2.3