Source-Changes-HG archive

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

[src/trunk]: src/usr.sbin/inetd document tcp4/tcp6 manipulation.



details:   https://anonhg.NetBSD.org/src/rev/23dfddfac0d4
branches:  trunk
changeset: 474277:23dfddfac0d4
user:      itojun <itojun%NetBSD.org@localhost>
date:      Fri Jul 02 16:49:34 1999 +0000

description:
document tcp4/tcp6 manipulation.

diffstat:

 usr.sbin/inetd/inetd.8 |  101 ++++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 100 insertions(+), 1 deletions(-)

diffs (115 lines):

diff -r 7dce65dcb62f -r 23dfddfac0d4 usr.sbin/inetd/inetd.8
--- a/usr.sbin/inetd/inetd.8    Fri Jul 02 15:58:35 1999 +0000
+++ b/usr.sbin/inetd/inetd.8    Fri Jul 02 16:49:34 1999 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: inetd.8,v 1.19 1999/07/02 04:48:19 itojun Exp $
+.\"    $NetBSD: inetd.8,v 1.20 1999/07/02 16:49:34 itojun Exp $
 .\"
 .\" Copyright (c) 1998 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -395,6 +395,105 @@
 will leave error message using
 .Xr syslog 3 ,
 and terminates itself.
+.Sh TCP6/UDP6 BEHAVIOR
+If you run servers for IPv4 and IPv6 traffic, you'll need to specify
+.Dq tcp4
+and
+.Dq tcp6
+properly on the
+.Pa inetd.conf
+lines.
+For safety reasons the author recommends you to run
+two separate process for the same server,
+on
+.Dq tcp6
+and
+.Dq tcp4 .
+For detailed description please read on.
+.Pp
+The behavior of 
+.Dv AF_INET6
+socket is documented in RFC2553.
+Basically, it says as follows:
+.Bl -bullet -compact
+.It
+Specific bind on
+.Dv AF_INET6
+socket
+.Po
+.Xr bind 2
+with address specified
+.Pc
+should accept IPv6 traffic to that address only.
+.It
+If you perform wildcard bind
+on
+.Dv AF_INET6
+socket
+.Po
+.Xr bind 2
+to IPv6 address
+.Li ::
+.Pc ,
+and there is no wildcard bind
+.Dv AF_INET
+socket on that TCP/UDP port, IPv6 traffic as well as IPv4 traffic
+should be routed to that
+.Dv AF_INET6
+socket.
+IPv4 traffic should be seen as if it came from IPv6 address like
+.Li ::ffff:10.1.1.1 .
+This is called IPv4 mapped address.
+.It
+If there are both wildcard bind
+.Dv AF_INET
+socket and wildcard bind
+.Dv AF_INET6
+socket on one TCP/UDP port, they should behave separately.
+IPv4 traffic should be routed to
+.Dv AF_INET
+socket and IPv6 should be routed to
+.Dv AF_INET6
+socket.
+.El
+.Pp
+Because of this,
+.Nm
+will behave as follows.
+.Bl -bullet -compact
+.It
+If you have only one server on
+.Dq tcp4 ,
+IPv4 traffic will be routed to the server.
+IPv6 traffic will not be accepted.
+.It
+If you have two servers on
+.Dq tcp4
+and
+.Dq tcp6 ,
+IPv4 traffic will be routed to the server on
+.Dq tcp4, and
+IPv6 traffic will go to server on
+.Dq tcp6 .
+.It
+If you have only one server on
+.Dq tcp6 ,
+Both IPv4 and IPv6 traffic will be routed to the server.
+.El
+.Pp
+The author do not recommend the third option on the above bullets.
+RFC2553 does not define the constraint between the order of
+.Xr bind 2 ,
+nor how IPv4 TCP/UDP port number and IPv6 TCP/UDP port number
+relate each other
+.Po
+should they be integrated or separated
+.Pc .
+Implemented behavior is very different across kernel to kernel.
+Many of the servers do not properly handle IPv4 mapped address.
+Therefore, it is unwise to rely too much upon the behavior of
+.Dv AF_INET6
+wildcard bind socket.
 .Sh BUGS
 Host address specifiers, while they make conceptual sense for RPC
 services, do not work entirely correctly.  This is largely because the



Home | Main Index | Thread Index | Old Index