From 4cdf0a35c94dac303fd703c05eb6685fc401a323 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Sun, 22 Jan 2017 11:37:55 +0000 Subject: p2p: always recreate a new peer id on startup This prevents easy fingerprinting when you change IPs, and will be a must when kovri gets used. --- src/p2p/net_node.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/p2p/net_node.h') diff --git a/src/p2p/net_node.h b/src/p2p/net_node.h index cc6a486d3..4eb001759 100644 --- a/src/p2p/net_node.h +++ b/src/p2p/net_node.h @@ -110,7 +110,12 @@ namespace nodetool void serialize(Archive &a, const t_version_type ver) { a & m_peerlist; - a & m_config.m_peer_id; + if (ver == 0) + { + // from v1, we do not store the peer id anymore + peerid_type peer_id; + a & peer_id; + } } // debug functions bool log_peerlist(); @@ -162,6 +167,7 @@ namespace nodetool #endif int handle_get_support_flags(int command, COMMAND_REQUEST_SUPPORT_FLAGS::request& arg, COMMAND_REQUEST_SUPPORT_FLAGS::response& rsp, p2p_connection_context& context); bool init_config(); + bool make_default_peer_id(); bool make_default_config(); bool store_config(); bool check_trust(const proof_of_trust& tr); -- cgit v1.2.3