p2p: unpack memory layout of peerlist entries

The `#pragma pack(push, 1)` directive was causing unaligned memory
accesses to shared pointers in `epee::net_utils::network_address`.
The peerlist file uses Boost serialization, so this should be
backwards compatible.
This commit is contained in:
jeffro256
2025-11-05 15:30:48 -06:00
committed by t1amak
parent 9612391b55
commit b7f5247717

View File

@@ -54,8 +54,6 @@ namespace nodetool
s << std::hex << peer_id;
return epee::string_tools::pad_string(s.str(), 16, '0', true);
}
#pragma pack (push, 1)
struct network_address_old
{
@@ -139,9 +137,6 @@ namespace nodetool
END_SERIALIZE()
};
typedef connection_entry_base<epee::net_utils::network_address> connection_entry;
#pragma pack(pop)
inline
std::string print_peerlist_to_string(const std::vector<peerlist_entry>& pl)
{