Closed PWBENNETT closed 3 years ago
Well, it seems I don't know how rx|...| works in Perl6. Hopefully you get the idea -- accept and silently discard an initial "::ffff:" if present.
https://en.wikipedia.org/wiki/IPv6_transition_mechanism#Stateless_IP.2FICMP_Translation describes the string, and apparently I misread it. The prefix space is ::ffff:0:0:0/96, and not ::ffff:0:0/96. This reveals a live bug in my own https://metacpan.org/release/Net-IPAddress-Util distro, so I suppose some good came of this...
Wikipedia states (or used to state, at least) that strings of the form "::ffff:1.2.3.4" are perfectly cromulent representations of an IPv4 string padded to appear in the IPv6 space. This is an attempt to make the existing code be able to accept strings like that.