IPv4-Mapped IPv6 Address used in DNS with AAAA-records

Jeroen Massar jeroen at massar.ch
Fri Jul 28 16:27:21 CEST 2023


> On 28 Jul 2023, at 15:56, Gert Doering <gert at space.net> wrote:
[..]
> (*) OpenVPN ran into this in many interesting ways, with replies like
> "oh we just forgot to implement this particular edge case" from kernel
> developers...  in retrospective, we should all have followed the OpenBSD
> approach to make v6-sockets v6, and v4-sockets v4, and disallow any
> mixing.

The reason for existence of that was to be able to just change code from AF_INET to AF_INET6 for a socket and then not have to bother with multiple sockets (IPv4 + IPv6) or heck multiple IPv4 + IPv6 addresses...

Indeed, that makes porting code to support IPv6 easier, "look mommy, s/AF_INET/AF_INET6/ it does IPv6" but in the end not the desired results, especially when later one has to bolt on Happy Eyeballs etc anyway :)

The other reason for the map is of course to just store IPv4 inside a IPv6 "address" as 16 bytes can store both. There, there is an argument to have it, especially considering the amount of memory on devices in 1995...

Thus in the end, it should likely not have existed, but eh ;)

Greets,
 Jeroen



More information about the ipv6-ops mailing list