This repository was archived by the owner on May 25, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 39
Is<property>() methods disagree with net.IP for 4in6 addresses #183
Copy link
Copy link
Open
Description
For IPv4 addresses mapped to IPv6 (e.g. ::ffff:127.0.0.1) netaddr.IP
methods (e.g. IsLoopback()
) return false
, but net.IP
returns true
(tested with go 1.16.4).
Given the goal of compatibility with net.IP this should probably be documented or fixed within this module. My presumption is fix, but I'm programmer, not a network expert.
This is one category found by #182.
https://play.golang.org/p/z2KVy-FsKmD
go1.16.4
netaddr.IP net.IP Discrepency
String ::ffff:e000:0 224.0.0.0
IsInterfaceLocalMulticast false false
IsLinkLocalMulticast false true true
IsLinkLocalUnicast false false
IsLoopback false false
IsMulticast false true true
netaddr.IP net.IP Discrepency
String ::ffff:e00f:0 224.15.0.0
IsInterfaceLocalMulticast false false
IsLinkLocalMulticast false false
IsLinkLocalUnicast false false
IsLoopback false false
IsMulticast false true true
netaddr.IP net.IP Discrepency
String ::ffff:7f00:1 127.0.0.1
IsInterfaceLocalMulticast false false
IsLinkLocalMulticast false false
IsLinkLocalUnicast false false
IsLoopback false true true
IsMulticast false false
Metadata
Metadata
Assignees
Labels
No labels