[Bug 1609] inetd should add IPV6_V6ONLY option to IPv6 socket

bugzilla at busybox.net bugzilla at busybox.net
Tue May 18 23:03:26 UTC 2010


https://bugs.busybox.net/show_bug.cgi?id=1609

--- Comment #1 from Denys Vlasenko <vda.linux at googlemail.com>  ---
There is a workaround which might be enough. If you bind to a local address,
then depending on address family you are getting bound to IPv6 only or IPv4
only:

# nc -vvv -l -s ::1 -p123
listening on [::1]:123 ...

Above: I created an IPv6 listening socket on loopback. Now, in another xterm:

# nc -vvv -l -s 127.0.0.1 -p123
listening on 127.0.0.1:123 ...

I can create an IPv4 listening socket on loopback on the same port, and they
happily coexist.

If I omit "-s ::1", then second nc complains: "nc: bind: Address already in
use"


The same idea works for inetd. You need to use address prefix syntax on conf
file:

::1:123 stream tcp6 nowait root echo echo Hello IPv6 localhost

-- 
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


More information about the busybox-cvs mailing list