Subject: Re: inetd v6
To: None <tech-net@netbsd.org>
From: None <itojun@iijlab.net>
List: tech-net
Date: 07/03/1999 01:17:33
>Is there a way to specify both tcp v4 and tcp v6 at once for when you
>want both to be served?
RFC2553 says that wildcard-bind to IPv6 socket will accept IPv4
traffic, as if it was from "::ffff:10.1.1.1".
If you run only one "tcp6" server on port X, connections to IPv4 port
X will be routed to that server.
There are several issues remain:
- for IPv6 UDP, wildcard-bind behavior is not implemented yet in
the kernel.
- ftpd cannot handle IPv4 connetions from IPv6 socket. You need
two lines on inetd.conf (for "tcp4" and "tcp6").
- we may need to have a way to disable the special behavior of
IPv6 wildcard bind (setsockopt?). It is not on the document.
Personally, I'm very against about the way wildcard-bind
IPv6 socket is spec'ed.
It seems to ease your life first.
However, actually it makes your life much harder.
- name resolution is way more complex: see RFC2553. many pages are
filled with special behavior of name resolver.
- If your application creates sockaddr from some outside data (like
ftp: it needs to construct sockaddr from PASV/PORT parameter)
you'll need to support 3 kind of addresses:
AF_INET socket, normal IPv4 address
AF_INET6 socket, normal IPv6 address
AF_INET6 socket, mapped IPv4 address (::ffff:10.1.1.1)
- it is a special case, which is not future adaptable. What happens
if you have IPv7 in the future? how will the wildcard bind behave?
- port number issue and bind order issue is never described.
What happens if you make a IPv4 specific bind for port X, then
IPv6 wildcard bind for port X? There are so many possibilities
and there's no document. No way.
itojun