Skip to content

Conversation

@gmaxwell
Copy link
Contributor

This conserves resources from abusive peers that just send
getaddr in a loop. Also makes correlating addr messages
against INVs less effective.

This conserves resources from abusive peers that just send
 getaddr in a loop. Also makes correlating addr messages
 against INVs less effective.
@dcousens
Copy link
Contributor

utACK 66b0724

@laanwj laanwj added the P2P label Apr 11, 2016
@jonasschnelli
Copy link
Contributor

utACK 66b0724

@sipa
Copy link
Member

sipa commented Apr 12, 2016

utACK 66b0724

// Only send one GetAddr response per connection to reduce resource waste
// and discourage addr stamping of INV announcements.
if (pfrom->fSentAddr) {
LogPrint("net", "Ignoring repeated \"getaddr\". peer=%d\n", pfrom->id);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cosmetic nits: The dot before peer looks ugly, but the same style is used above (getaddr from outbound connection). The space in the comment in the second line, before the word "and" is unintentional?

@paveljanik
Copy link
Contributor

ACK 66b0724

@theuni
Copy link
Member

theuni commented Apr 13, 2016

utACK 66b0724

@laanwj
Copy link
Member

laanwj commented Apr 15, 2016

Good idea.
utACK 66b0724

@laanwj laanwj merged commit 66b0724 into bitcoin:master Apr 15, 2016
laanwj added a commit that referenced this pull request Apr 15, 2016
66b0724 Only send one GetAddr response per connection. (Gregory Maxwell)
codablock pushed a commit to codablock/dash that referenced this pull request Dec 20, 2017
66b0724 Only send one GetAddr response per connection. (Gregory Maxwell)
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants