Skip to content
This repository has been archived by the owner on Jul 21, 2023. It is now read-only.

fix: actually check tcp multiaddrs #94

Merged
merged 2 commits into from
Jul 2, 2020
Merged

fix: actually check tcp multiaddrs #94

merged 2 commits into from
Jul 2, 2020

Conversation

jacobheun
Copy link
Contributor

multiaddr.toOptions can return addresses that are not TCP only multiaddrs. This can cause dns based multiaddrs to be returned, which causes an error because the underlying dns system expects an IP address as an answer.

This change leverages the multiaddr.isThinWaistAddress() to avoid responding with invalid addresses.

Copy link
Member

@vasco-santos vasco-santos left a comment

Choose a reason for hiding this comment

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

LGTM! Good catch

@jacobheun jacobheun merged commit 9f45f73 into master Jul 2, 2020
@jacobheun jacobheun deleted the fix/non-tcp-addrs branch July 2, 2020 13:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants