-
Notifications
You must be signed in to change notification settings - Fork 38.7k
Only send one GetAddr response per connection. #7856
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This conserves resources from abusive peers that just send getaddr in a loop. Also makes correlating addr messages against INVs less effective.
|
utACK 66b0724 |
|
utACK 66b0724 |
|
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); |
There was a problem hiding this comment.
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?
|
ACK 66b0724 |
|
utACK 66b0724 |
|
Good idea. |
66b0724 Only send one GetAddr response per connection. (Gregory Maxwell)
66b0724 Only send one GetAddr response per connection. (Gregory Maxwell)
This conserves resources from abusive peers that just send
getaddr in a loop. Also makes correlating addr messages
against INVs less effective.