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
parent 6bb36309d6
commit acda1d4a37
No known key found for this signature in database
GPG Key ID: 6F79797A6E392442

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)
template<typename AddressType>
struct peerlist_entry_base
@ -108,8 +106,6 @@ namespace nodetool
};
typedef anchor_peerlist_entry_base<epee::net_utils::network_address> anchor_peerlist_entry;
#pragma pack(pop)
inline
std::string print_peerlist_to_string(const std::vector<peerlist_entry>& pl)
{