[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Default value of net.ipv6.bindv6only should revert to 0

Adam Borowski <kilobyte@angband.pl> writes:

> Instead of listening on a single socket, you need to change every single
> daemon to include a select() loop.  That's explicitely allowed by all
> relevant RFCs and by POSIX, so breaking that is quite a regression.

Yeah, I understand why POSIX made the choice that they did.  I just think
it's a bad tradeoff.  Providing a way for the application to specifically
request IPv4-mapped addresses so that it could use a single socket would
have provided the same basic functionality but only for applications that
knew what they were getting into, as opposed to the current situation
where the first simplistic port to IPv6 (usually committed by a software
maintainer who doesn't themselves use IPv6 back in the early days of
massive IPv6 porting) usually just switches to IPv6-capable sockets
without changing anything else about the networking layer and ignoring
issues of mapped addresses.

The mapped address approach makes it much faster to get a simple port to
IPv6 working, at the cost of surprising results.

BTW, I've not tried this myself: does someone know what happens if a
daemon called from an inetd equivalent calls getpeername() on a socket
bound by an IPv6-aware inetd using mapped addresses?  For IPv4
connections, does it get back an IPv4 address or an IPv6 mapped address?
Do the inetd implementations currently in Debian separately bind IPv4 and
IPv6 sockets, or do they use mapped addresses?

Russ Allbery (rra@debian.org)               <http://www.eyrie.org/~eagle/>

Reply to: