-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
identify: don't filter dns addresses based on remote addr type #2553
Conversation
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.
Do we need to make the same change in Kademlia?
Would it make sense to move all of this logic to go-multiaddr? It seems like every protocol that is accepting address advertisements from peers needs exactly the same filtering logic. (If so, we can do that in a follow-up PR, this code looks correct).
I think it makes sense to modify |
Makes sense. |
lhAddr := ma.StringCast("/ip4/127.0.0.1/udp/123/quic-v1") | ||
privAddr := ma.StringCast("/ip4/192.168.1.101/tcp/123") | ||
pubAddr := ma.StringCast("/ip6/2::1/udp/123/quic-v1") | ||
dnsAddr := ma.StringCast("/dns/example.com/udp/123/quic-v1") |
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.
Should we add a /dns/localhost
address here?
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.
I'd prefer adding this when we start using the updated functions in go-multiaddr package.
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.
Here's the v0.12 release PR: multiformats/go-multiaddr#223
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.
v0.12 was released: https://github.com/multiformats/go-multiaddr/releases/tag/v0.12.0
@sukunrt Can you update this PR?
6f6a5b7
to
c590686
Compare
sorry about the delay. I was procrastinating this thinking autorelay tests would fail, but turns out those tests don't actually use /dns4/localhost anywhere. |
c590686
to
576a251
Compare
a946380
to
1674737
Compare
closes: #2550