diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2016-09-15 23:32:45 +0200 |
---|---|---|
committer | Luke Dashjr <luke-jr+git@utopios.org> | 2016-09-21 02:43:47 +0000 |
commit | 42ea51a65fdacc9a0bf687474bc3839b854c726f (patch) | |
tree | c68dd2e9f0a3f83e3e3326b640111219c69d236e /src | |
parent | ea51b0f5ddd705dd955eb5220253c6e325279609 (diff) | |
download | bitcoin-42ea51a65fdacc9a0bf687474bc3839b854c726f.tar.xz |
net: No longer send local address in addrMe
After #8594 the addrFrom sent by a node is not used anymore at all,
so don't bother sending it.
Also mitigates the privacy issue in (#8616). It doesn't completely solve
the issue as GetLocalAddress is also called in AdvertiseLocal, but at
least when advertising addresses it stands out less as *our* address.
Github-Pull: #8740
Rebased-From: d9c99c3058c90f4f7075cf5c495b8dcd2e7519a7
Diffstat (limited to 'src')
-rw-r--r-- | src/net.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/net.cpp b/src/net.cpp index fb85bedffa..a0ab544f5f 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -499,7 +499,7 @@ void CNode::PushVersion() int64_t nTime = (fInbound ? GetAdjustedTime() : GetTime()); CAddress addrYou = (addr.IsRoutable() && !IsProxy(addr) ? addr : CAddress(CService("0.0.0.0", 0), addr.nServices)); - CAddress addrMe = GetLocalAddress(&addr); + CAddress addrMe = CAddress(CService(), nLocalServices); GetRandBytes((unsigned char*)&nLocalHostNonce, sizeof(nLocalHostNonce)); if (fLogIPs) LogPrint("net", "send version message: version %d, blocks=%d, us=%s, them=%s, peer=%d\n", PROTOCOL_VERSION, nBestHeight, addrMe.ToString(), addrYou.ToString(), id); |