Re: ipv6 and ipv4 interaction weirdness

From: Simon Kelley
Date: Fri Mar 11 2005 - 09:29:38 EST

CaT wrote:
I just had some issues with ssh and trying to get it to bind to all ipv6
and ipv4 addresses to it via :: and The problem was that it'd
only let one succeed. If was successful then :: port 22 could
not happen and neither could my ipv6 addy port 22 as it would get the
'address already in use' error from bind(). The reverse was also true.
If it bound to :: port 22 then would fail.

On the other hand if I got it to bind to each address individually then
both ipv4 (2 addresses) and ipv6 (1 address) binds would succeed.

Maybe I'm just looking at it wrong but shouldn't ipv4 and ipv6 interfere
with each other?

I'm using kernel 2.6.11-ac2 with OpenSSH_3.8.1p1 Debian-8.sarge.4,
OpenSSL 0.9.7e 25 Oct 2004 and glibc 2.3.2 (debian version

A solution is to set the IPV6_V6ONLY sockopt on the IPv6 socket (or just use IPv6 sockets and their ability to accept IPv4 connections in a corner of the IPv6 address space).

It seems unlikely that a released ssh would have that problem, but I haven't checked.



To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at