mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-18 22:35:39 +01:00
Cache responses to addr requests
Prevents a spy from scraping victim's AddrMan by reconnecting and re-requesting addrs.
This commit is contained in:
@@ -3477,7 +3477,7 @@ void ProcessMessage(
|
||||
pfrom.fSentAddr = true;
|
||||
|
||||
pfrom.vAddrToSend.clear();
|
||||
std::vector<CAddress> vAddr = connman.GetAddresses();
|
||||
std::vector<CAddress> vAddr = connman.GetAddresses(pfrom.addr.GetNetwork());
|
||||
FastRandomContext insecure_rand;
|
||||
for (const CAddress &addr : vAddr) {
|
||||
pfrom.PushAddress(addr, insecure_rand);
|
||||
|
||||
Reference in New Issue
Block a user