Merge #8740: net: No longer send local address in addrMe

d9c99c3 net: No longer send local address in addrMe (Wladimir J. van der Laan)
This commit is contained in:
Wladimir J. van der Laan 2016-09-19 09:27:41 +02:00
commit 239e8ce958
No known key found for this signature in database
GPG Key ID: 74810B012346C9A6

View File

@ -448,7 +448,7 @@ void CNode::PushVersion()
{ {
int64_t nTime = (fInbound ? GetAdjustedTime() : GetTime()); int64_t nTime = (fInbound ? GetAdjustedTime() : GetTime());
CAddress addrYou = (addr.IsRoutable() && !IsProxy(addr) ? addr : CAddress(CService(), addr.nServices)); CAddress addrYou = (addr.IsRoutable() && !IsProxy(addr) ? addr : CAddress(CService(), addr.nServices));
CAddress addrMe = GetLocalAddress(&addr, nLocalServices); CAddress addrMe = CAddress(CService(), nLocalServices);
if (fLogIPs) if (fLogIPs)
LogPrint("net", "send version message: version %d, blocks=%d, us=%s, them=%s, peer=%d\n", PROTOCOL_VERSION, nMyStartingHeight, addrMe.ToString(), addrYou.ToString(), id); LogPrint("net", "send version message: version %d, blocks=%d, us=%s, them=%s, peer=%d\n", PROTOCOL_VERSION, nMyStartingHeight, addrMe.ToString(), addrYou.ToString(), id);
else else