Skip to content
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

core: remove duplicates when performing address translation #1697

Merged

Conversation

andresilva
Copy link
Contributor

When doing address translation we want to keep the discovered external address but keep the local port. If we are listening on multiple addresses (with the same port) we end up with a bunch of duplicates.

Copy link
Contributor

@romanb romanb left a comment

Choose a reason for hiding this comment

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

I think this is a good thing to do, not least because, as far as I understand it, these duplicates result in undesirable increases of an observed addresses "score" here.

core/src/network.rs Outdated Show resolved Hide resolved
@romanb romanb merged commit b601ed4 into libp2p:master Aug 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants