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

Only send one GetAddr response per connection. #7856

Merged
merged 1 commit into from Apr 15, 2016

Conversation

Projects
None yet
7 participants
@gmaxwell
Member

gmaxwell commented Apr 11, 2016

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

Only send one GetAddr response per connection.
This conserves resources from abusive peers that just send
 getaddr in a loop. Also makes correlating addr messages
 against INVs less effective.
@dcousens

This comment has been minimized.

Show comment
Hide comment
@dcousens

dcousens Apr 11, 2016

Contributor

utACK 66b0724

Contributor

dcousens commented Apr 11, 2016

utACK 66b0724

@laanwj laanwj added the P2P label Apr 11, 2016

@jonasschnelli

This comment has been minimized.

Show comment
Hide comment
@jonasschnelli
Member

jonasschnelli commented Apr 11, 2016

utACK 66b0724

@sipa

This comment has been minimized.

Show comment
Hide comment
@sipa

sipa Apr 12, 2016

Member

utACK 66b0724

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);

This comment has been minimized.

@paveljanik

paveljanik Apr 12, 2016

Contributor

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

paveljanik Apr 12, 2016

Contributor

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

This comment has been minimized.

Show comment
Hide comment
@paveljanik

paveljanik Apr 12, 2016

Contributor

ACK 66b0724

Contributor

paveljanik commented Apr 12, 2016

ACK 66b0724

@theuni

This comment has been minimized.

Show comment
Hide comment
@theuni

theuni Apr 13, 2016

Member

utACK 66b0724

Member

theuni commented Apr 13, 2016

utACK 66b0724

@laanwj

This comment has been minimized.

Show comment
Hide comment
@laanwj

laanwj Apr 15, 2016

Member

Good idea.
utACK 66b0724

Member

laanwj commented Apr 15, 2016

Good idea.
utACK 66b0724

@laanwj laanwj merged commit 66b0724 into bitcoin:master Apr 15, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

laanwj added a commit that referenced this pull request Apr 15, 2016

Merge #7856: Only send one GetAddr response per connection.
66b0724 Only send one GetAddr response per connection. (Gregory Maxwell)

codablock added a commit to codablock/dash that referenced this pull request Sep 16, 2017

Merge #7856: Only send one GetAddr response per connection.
66b0724 Only send one GetAddr response per connection. (Gregory Maxwell)

codablock added a commit to codablock/dash that referenced this pull request Sep 19, 2017

Merge #7856: Only send one GetAddr response per connection.
66b0724 Only send one GetAddr response per connection. (Gregory Maxwell)

codablock added a commit to codablock/dash that referenced this pull request Dec 20, 2017

Merge #7856: Only send one GetAddr response per connection.
66b0724 Only send one GetAddr response per connection. (Gregory Maxwell)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment