From 9c489e22915c57f883e5bdb32c646c9f3466a245 Mon Sep 17 00:00:00 2001 From: Mikhail Titov Date: Tue, 14 Jul 2015 12:40:03 -0500 Subject: [PATCH] Don't include yourip (0.0.0.0) in i2p handshake --- src/bt_peer_connection.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/bt_peer_connection.cpp b/src/bt_peer_connection.cpp index 69fe055bd..05a0f4dd0 100644 --- a/src/bt_peer_connection.cpp +++ b/src/bt_peer_connection.cpp @@ -2282,7 +2282,10 @@ namespace libtorrent std::string remote_address; std::back_insert_iterator out(remote_address); detail::write_address(remote().address(), out); - handshake["yourip"] = remote_address; +#if TORRENT_USE_I2P + if (!is_i2p(*get_socket())) +#endif + handshake["yourip"] = remote_address; handshake["reqq"] = m_settings.get_int(settings_pack::max_allowed_in_request_queue); boost::shared_ptr t = associated_torrent().lock(); TORRENT_ASSERT(t);