diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/net.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/net.cpp b/src/net.cpp index e8c131b5b0..3820ee1fd0 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -2801,6 +2801,9 @@ std::vector<CAddress> CConnman::GetAddresses(CNode& requestor, size_t max_addres uint64_t cache_id = GetDeterministicRandomizer(RANDOMIZER_ID_ADDRCACHE) .Write(requestor.ConnectedThroughNetwork()) .Write(local_socket_bytes.data(), local_socket_bytes.size()) + // For outbound connections, the port of the bound address is randomly + // assigned by the OS and would therefore not be useful for seeding. + .Write(requestor.IsInboundConn() ? requestor.addrBind.GetPort() : 0) .Finalize(); const auto current_time = GetTime<std::chrono::microseconds>(); auto r = m_addr_response_caches.emplace(cache_id, CachedAddrResponse{}); |