mirror of
https://github.com/logos-messaging/go-multiaddr.git
synced 2026-08-25 05:41:13 +00:00
Check for local ip6 addresses with more flexbility
Currently IsIPLoopback returns true for any multiaddr starting ip4/127, but only returns true on ip6 addresses that exactly equal ip6/::1. So /ip6/::1/tcp/4001 for example does not return true. Instead we should check whether ip6/::1 is contained in the multiaddr, and to do that I simply decapsulated and checked to see if the result is different. It seems this was not caught by tests as none are present specifically for this function.
This commit is contained in:
Reference in New Issue
Block a user