libp2p / js-peer-info

libp2p Peer abstraction Node.js implementation
https://libp2p.io
MIT License
37 stars 28 forks source link

distinct wildcard addresses are conflated. #60

Open pgte opened 6 years ago

pgte commented 6 years ago

When two wildcard addresses are im the multiaddresses and they use wildcard address and port, they are deemed as the same in peerInfo.multiaddrs.distinct(), only one of them being returned.

For instance,

/ip4/0.0.0.0/tcp/0 is conflated with /ip4/0.0.0.0/tcp/0/some-other-transport because the tranport and port are the same, but really 0 here signifies "any port" and should lead to distinct addresses.

pgte commented 6 years ago

Clarification: the conflation happens because of the wildcard port, not IP address.