Subject: bin/33796: inetd should be less fussy with resolved addresses in inetd.conf
To: None <gnats-admin@netbsd.org, netbsd-bugs@netbsd.org>
From: Rhialto <rhialto@falu.nl>
List: netbsd-bugs
Date: 06/22/2006 22:55:00
>Number: 33796
>Category: bin
>Synopsis: inetd should be less fussy with resolved addresses in inetd.conf
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: bin-bug-people
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Thu Jun 22 22:55:00 +0000 2006
>Originator: Rhialto
>Release: NetBSD 3.0
>Organization:
>Environment:
System: NetBSD radl.falu.nl 3.0 NetBSD 3.0 (Radls Doordringend Onjuiste Akkoord) #0: Sat Jan 28 16:44:07 CET 2006 root@radl.falu.nl:/usr/src/sys/arch/amd64/compile/RADL amd64
Architecture: x86_64
Machine: amd64
>Description:
In my inetd.conf, I have these lines, among others:
radl.falu.nl:
telnet stream tcp nowait root /usr/libexec/telnetd telnetd -k
telnet stream tcp6 nowait root /usr/libexec/telnetd telnetd -k
radl.falu.nl resolves to multiple addresses, IPv4 and IPv6.
inetd logs this in syslog:
Jun 22 23:57:25 radl inetd[207]: telnet/tcp6: radl.falu.nl: resolved to multiple addr
and then does not bind to them all, only to the IPv4 one.
$ telnet radl.falu.nl
Trying 2222:222:2222::1...
telnet: connect to address 2222:222:2222::1: Connection refused
Trying fe80::222:2222:2222:2222%sk0...
telnet: connect to address fe80::222:2222:2222:2222%sk0: Connection refused
Trying 10.0.0.13...
Connected to radl.falu.nl.
Escape character is '^]'.
Trying SRA secure login:
User (rhialto):
I would expect that the telnet/tcp line binds to all tcp4
addresses and that the telnet/tcp6 line binds to all tcp6
addresses (which it does not do; it binds to none of them).
That is what makes most sense (the Principle Of Least
Astonishment).
>How-To-Repeat:
Configure dns as above and telnet to the multi-protocolled name.
>Fix:
Loop over all addresses associated with the name when opening
listening sockets.
-Olaf.
--
___ Olaf 'Rhialto' Seibert -- You author it, and I'll reader it.
\X/ rhialto/at/xs4all.nl -- Cetero censeo "authored" delendum esse.
>Unformatted: