* IPv6-only flag set on v6 sockets prevents the use of v4-mapped addresses
@ 2023-05-22 6:48 Nathaniel Filardo
0 siblings, 0 replies; only message in thread
From: Nathaniel Filardo @ 2023-05-22 6:48 UTC (permalink / raw)
To: wireguard; +Cc: Nathaniel Filardo
Hello wireguard@,
I recently found out that in-Linux wireguard has, since its inception,
set its v6 sockets to v6-only
(https://github.com/torvalds/linux/blob/e7096c131e5161fa3b8e52a650d7719d2857adfd/drivers/net/wireguard/socket.c#L381)
and it keys only off the address family to decide which socket to use
(https://github.com/torvalds/linux/blob/e7096c131e5161fa3b8e52a650d7719d2857adfd/drivers/net/wireguard/socket.c#L188).
This means that v4-mapped v6 addresses (::ffff:a.b.c.d) can be
registered as peer endpoints, but the kernel very silently won't try
to reach out. Is that deliberate for some reason that eludes me? If
it is, could the userspace tooling be educated about v4-mapped
addresses and translate them accordingly before handing them up to the
kernel; if it isn't, could we drop the v6-only flag on the kernel
socket?
Thanks for any input,
--nwf;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-05-22 10:13 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-22 6:48 IPv6-only flag set on v6 sockets prevents the use of v4-mapped addresses Nathaniel Filardo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).