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

Convert ipv4-mapped ipv6 when accepting peer #3225

Merged
merged 1 commit into from
Feb 14, 2020

Conversation

quentinlesceller
Copy link
Member

@quentinlesceller quentinlesceller commented Feb 6, 2020

Linked to #3221.
Maybe a bit naive. This will attempt to convert ipv4-mapped ipv6 when accepting peer, so we don't accept twice the same IP (ipv4 and ipv4-mapped ipv6).

@quentinlesceller
Copy link
Member Author

quentinlesceller commented Feb 6, 2020

I'm not even sure TcpListener accept() will give us an ipv4 mapped ipv6.

@antiochp
Copy link
Member

antiochp commented Feb 10, 2020

I'm not even sure TcpListener accept() will give us an ipv4 mapped ipv6.

My understanding is it will if the local node is listening on :: (rather than 0.0.0.0).
i.e. If we are listening for both ipv4 and ipv6 connections then any ipv4 connections will themselves be mapped as we need a common way of representing them internally.

Which is making me think about why we are suddenly seeing a large number of these mapped addresses on the network.

  • single node on the network listening on ::
  • every ipv4 address connecting to it will be seen as a mapped address by this node
  • it will then send out a peer addrs msg containing many mapped addresses to its peers
  • these then propagate through the network via peer addrs msgs

Copy link
Member

@antiochp antiochp left a comment

Choose a reason for hiding this comment

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

👍

@antiochp antiochp added this to the 3.1.0 milestone Feb 14, 2020
@quentinlesceller quentinlesceller merged commit 053415d into mimblewimble:master Feb 14, 2020
@antiochp antiochp mentioned this pull request Feb 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