mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02: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:
parent
7cc0e8101f
commit
acd6135b43
3 changed files with 43 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue