netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Simon Kelley <simon@thekelleys.org.uk>
To: CaT <cat@zip.com.au>
Cc: linux-kernel@vger.kernel.org, netdev@oss.sgi.com,
	pekkas@netcore.fi, yoshfuji@linux-ipv6.org
Subject: Re: ipv6 and ipv4 interaction weirdness
Date: Fri, 11 Mar 2005 14:21:02 +0000	[thread overview]
Message-ID: <4231A94E.9020904@thekelleys.org.uk> (raw)
In-Reply-To: <20050311121655.GE14146@zip.com.au>

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 0.0.0.0. The problem was that it'd
> only let one succeed. If 0.0.0.0:22 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 0.0.0.0:22 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
> 2.3.2.ds1-20).
> 

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.

Cheers,

Simon.

  reply	other threads:[~2005-03-11 14:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-11 12:16 ipv6 and ipv4 interaction weirdness CaT
2005-03-11 14:21 ` Simon Kelley [this message]
2005-03-11 14:58 ` YOSHIFUJI Hideaki / 吉藤英明
2005-03-11 15:11   ` CaT

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4231A94E.9020904@thekelleys.org.uk \
    --to=simon@thekelleys.org.uk \
    --cc=cat@zip.com.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@oss.sgi.com \
    --cc=pekkas@netcore.fi \
    --cc=yoshfuji@linux-ipv6.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).