-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: return correct family from toOptions with dns4 MultiAddr (#233)
When calling toOptions with a dns4 multiaddress, a MultiaddrObject is returned where the ip family is 6 instead of 4. This causes an issue where libp2p is unable to resolve the domain and dial the peer. This only appears to be an issue on some systems. It works on Mac OS but fails on for example Alpine Linux. Example: ```javascript const {multiaddr} = require("multiaddr") console.log(multiaddr('/dns4/google.net/tcp/8000').toOptions())` ``` ```javascript Object {family: 6, host: "google.net", transport: "tcp", port: 8000} ``` Co-authored-by: achingbrain <alex@achingbrain.net>
- Loading branch information
1 parent
2c733fa
commit d3f8b05
Showing
2 changed files
with
64 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters