mirror of
https://github.com/toreanderson/clatd
synced 2026-05-01 08:47:47 +00:00
This works around a bug in Net::DNS (or arguably in IO::Socket::IP) which causes it to refuse to send queries to IPv4 nameservers (even localhost), when running on IPv6-only hosts. Since IPv6-only hosts are the primary use case for clatd, and most modern Linux distributions are shipping with systemd-resolved listening on 127.0.0.53 by default, this prevents PLAT prefix discovery from working correctly out of the box. Forcing Net::DNS to use an IPv6 socket, by simply substituting all IPv4 addresses in the name server as IPv4-mapped IPv6 addreses, successfully works around this problem. This bug has been present in Net::DNS since version 1.03 (more specifically since SVN r1406, dated 2015-10-05). This version started defaulting to using IO::Socket::IP for all sockets, so it is no longer necessary to require it explicitly in clatd. For more info: https://rt.cpan.org/Public/Bug/Display.html?id=158714 (Net::DNS) https://rt.cpan.org/Public/Bug/Display.html?id=132760 (IO::Socket::IP)
2.1 KiB
2.1 KiB