Closed monoidic closed 1 year ago
yep, we will not switch because of backward compact reasons.
also the issue is with net.IP, not something that can be fixed here, nor do I want to work around it, because it's pretty much a niche feature.
I don't know if anyone filed a upstream Go bug for this.
related: #1107
This appears to be more of an issue with how
net.IP
works, with how e.g::ffff:255.255.255.255
gets.String()
-ed as255.255.255.255
. IPv4 addresses do not get parsed as IPv4-mapped IPv6 addresses, hence it is impossible to convert back and forth between RRs and the.String()
output. Here is an example which makes the issue clear.Output:
Just switching to
net/netip
would be a relatively simple fix, though changing the type ofAAAA.AAAA
(andA.A
as well to keep them uniform) fromnet.IP
tonetip.Addr
would be 1) a pretty big breaking change, 2) breaking the promise to support the last two versions of Go, at least until 1.19 is released. Though I suspect that, due to the benefits ofnetip.Addr
overnet.IP
, the former will be preferred over the latter anyhow in new code.