aboutsummaryrefslogtreecommitdiff
path: root/src/p2p/net_node.inl
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2019-04-23 11:07:44 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2019-04-24 17:56:12 +0000
commit28a7d31565cb722e1a388743e2cbc492b6ad3bed (patch)
tree623e7e6a9f6f77db2103e1890a8512586640965f /src/p2p/net_node.inl
parentMerge pull request #5466 (diff)
downloadmonero-28a7d31565cb722e1a388743e2cbc492b6ad3bed.tar.xz
p2p: do not send last_seen timestamp to peers
This can be used for fingerprinting and working out the network topology. Instead of sending the first N (which are sorted by last seen time), we sent a random subset of the first N+N/5, which ensures reasonably recent peers are used, while preventing repeated calls from deducing new entries are peers the target node just connected to. The list is also randomly shuffled so the original set of timestamps cannot be approximated.
Diffstat (limited to 'src/p2p/net_node.inl')
-rw-r--r--src/p2p/net_node.inl4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/p2p/net_node.inl b/src/p2p/net_node.inl
index be97edbe5..ba29d92c9 100644
--- a/src/p2p/net_node.inl
+++ b/src/p2p/net_node.inl
@@ -1955,7 +1955,7 @@ namespace nodetool
const epee::net_utils::zone zone_type = context.m_remote_address.get_zone();
network_zone& zone = m_network_zones.at(zone_type);
- zone.m_peerlist.get_peerlist_head(rsp.local_peerlist_new);
+ zone.m_peerlist.get_peerlist_head(rsp.local_peerlist_new, true);
m_payload_handler.get_payload_sync_data(rsp.payload_data);
/* Tor/I2P nodes receiving connections via forwarding (from tor/i2p daemon)
@@ -2058,7 +2058,7 @@ namespace nodetool
});
//fill response
- zone.m_peerlist.get_peerlist_head(rsp.local_peerlist_new);
+ zone.m_peerlist.get_peerlist_head(rsp.local_peerlist_new, true);
get_local_node_data(rsp.node_data, zone);
m_payload_handler.get_payload_sync_data(rsp.payload_data);
LOG_DEBUG_CC(context, "COMMAND_HANDSHAKE");