aboutsummaryrefslogtreecommitdiff
path: root/contrib/epee/include/net
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2016-01-31 15:20:18 +0200
committerRiccardo Spagni <ric@spagni.net>2016-01-31 15:20:18 +0200
commit39d73d2a27730e6a5844c259d81a0ed9d4ee3000 (patch)
tree50dbaa4414eb8ba49ba28df525bc58b7fc587630 /contrib/epee/include/net
parentMerge pull request #630 (diff)
parentdaemon: fix a few issues reported by valgrind (diff)
downloadmonero-39d73d2a27730e6a5844c259d81a0ed9d4ee3000.tar.xz
Merge pull request #631
bcac101 daemon: fix a few issues reported by valgrind (moneromooo-monero) a7e8174 tx_pool: fix serialization of new relayed data (moneromooo-monero) 601ad76 hardfork: fix mixup in indexing variable in get_voting_info (moneromooo-monero) 444e22f blockchain: remove unused timer (moneromooo-monero) 7edfdd8 blockchain: fix m_sync_counter uninitialized variable use (moneromooo-monero) d97582c epee: use generate_random_bytes for new random uuids (moneromooo-monero) 17c7c9c epee: remove dodgy random code that nobody uses (moneromooo-monero)
Diffstat (limited to 'contrib/epee/include/net')
-rw-r--r--contrib/epee/include/net/abstract_tcp_server2.inl7
1 files changed, 6 insertions, 1 deletions
diff --git a/contrib/epee/include/net/abstract_tcp_server2.inl b/contrib/epee/include/net/abstract_tcp_server2.inl
index 5bf65d7fd..934132ea2 100644
--- a/contrib/epee/include/net/abstract_tcp_server2.inl
+++ b/contrib/epee/include/net/abstract_tcp_server2.inl
@@ -141,7 +141,12 @@ PRAGMA_WARNING_DISABLE_VS(4355)
context = boost::value_initialized<t_connection_context>();
long ip_ = boost::asio::detail::socket_ops::host_to_network_long(remote_ep.address().to_v4().to_ulong());
- context.set_details(boost::uuids::random_generator()(), ip_, remote_ep.port(), is_income);
+ // create a random uuid
+ boost::uuids::uuid random_uuid;
+ // that stuff turns out to be included, even though it's from src... Taking advantage
+ crypto::generate_random_bytes(sizeof(random_uuid), &random_uuid);
+
+ context.set_details(random_uuid, ip_, remote_ep.port(), is_income);
_dbg3("[sock " << socket_.native_handle() << "] new connection from " << print_connection_context_short(context) <<
" to " << local_ep.address().to_string() << ':' << local_ep.port() <<
", total sockets objects " << m_ref_sock_count);