Skip to content

swarm: fix recursive resolving of DNS multiaddrs#2564

Merged
marten-seemann merged 2 commits intomasterfrom
recursive-resolving
Oct 25, 2023
Merged

swarm: fix recursive resolving of DNS multiaddrs#2564
marten-seemann merged 2 commits intomasterfrom
recursive-resolving

Conversation

@marten-seemann
Copy link
Copy Markdown
Contributor

No description provided.

@marten-seemann marten-seemann linked an issue Sep 10, 2023 that may be closed by this pull request
@marten-seemann marten-seemann marked this pull request as draft September 11, 2023 13:40
@marten-seemann
Copy link
Copy Markdown
Contributor Author

The code works, but I should add a test case before we merge this.

Copy link
Copy Markdown
Member

@sukunrt sukunrt left a comment

Choose a reason for hiding this comment

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

This change looks fine to me. But should https://github.com/libp2p/go-libp2p/blob/master/p2p/transport/websocket/websocket.go#L139 ignore dnsaddr addresses since the actual host will be obtained after resolving the dnsaddr

@dennis-tra
Copy link
Copy Markdown
Contributor

dennis-tra commented Sep 12, 2023

Just smoked-tested it with boomo and can also confirm that it works:

boomo_up{otel_scope_name="github.com/plprobelab/boomo",otel_scope_version="",peer="QmNnooDu7bfjPFoTZYxMNLWUQJyrVwtbZg5gBMjTezGAJN",transport="ws"} 1
boomo_up{otel_scope_name="github.com/plprobelab/boomo",otel_scope_version="",peer="QmQCU2EcMqAqQPR2i9bChDtGNJchTbq5TbXJJ16u19uLTa",transport="ws"} 0
boomo_up{otel_scope_name="github.com/plprobelab/boomo",otel_scope_version="",peer="QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ",transport="ws"} 0
boomo_up{otel_scope_name="github.com/plprobelab/boomo",otel_scope_version="",peer="QmbLHAnMoJPWSCR5Zhtx6BHJX9KiKNN6tpvbUcqanj75Nb",transport="ws"} 1
boomo_up{otel_scope_name="github.com/plprobelab/boomo",otel_scope_version="",peer="QmcZf59bWwK5XFi76CZX8cbJ4BhTzzA3gU1ZjYZcYW3dwt",transport="ws"} 1

(see the 1 at the end of the prometheus metric - at least for 3/5 bootstrappers). I guess QmQCU2EcMqAqQPR2i9bChDtGNJchTbq5TbXJJ16u19uLTa isn't working because rust doesn't support ws? QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ is only configured with tcp.

@marten-seemann marten-seemann marked this pull request as ready for review October 25, 2023 08:44
@marten-seemann
Copy link
Copy Markdown
Contributor Author

I added a test case, and linked the original issue.

@marten-seemann marten-seemann merged commit 81d5c0c into master Oct 25, 2023
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.

DNSAddr does not respect transport-specific DNS resolution

3 participants