From bc1144e98e3f3f9332024c09105b7775af285966 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Fri, 17 May 2019 18:03:04 +0000 Subject: Fix IP address serialization on big endian IP addresses are stored in network byte order even on little endian hosts --- src/p2p/net_peerlist_boost_serialization.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/p2p/net_peerlist_boost_serialization.h') diff --git a/src/p2p/net_peerlist_boost_serialization.h b/src/p2p/net_peerlist_boost_serialization.h index 05eb36e65..c2773981c 100644 --- a/src/p2p/net_peerlist_boost_serialization.h +++ b/src/p2p/net_peerlist_boost_serialization.h @@ -95,7 +95,9 @@ namespace boost { uint32_t ip{na.ip()}; uint16_t port{na.port()}; + ip = SWAP32LE(ip); a & ip; + ip = SWAP32LE(ip); a & port; if (!typename Archive::is_saving()) na = epee::net_utils::ipv4_network_address{ip, port}; -- cgit v1.2.3