Re: ipv6 binds to ipv4, bug or feature ?

Matti Aarnio (matti.aarnio@sonera.fi)
Sun, 2 Jan 2000 07:29:07 +0200


On Sun, Jan 02, 2000 at 07:02:32AM +0200, Elmer Joandi wrote:
> On Sun, 2 Jan 2000, Matti Aarnio wrote:
> > Bind SSHD to your host's IPv6 address, and THEN it should
> > not happen. (Quite analogous to doing address+port specific
> > binding in IPv4)
>
> Yep, it doesn't,
> I was reading sshd docs on switch -6 and assumed it won't bind, but those
> docs assumed, that ipv4 is a subpart of ipv6

That is what the IPv6 specifications tells it to be.

> however, as long as ipv6 is still experimental, it would be nice to be
> able to switch it off from /proc

Things like port-number spaces and TCP and UDP are common
in between IPv4 and IPv6, IP - of course - isn't, nor ICMP.
ARP and RARP are IPv4 things only.

What do you want to switch off ?

> I.e : to have somewhere a _master switch_ which makes ipv4 and ipv6
> separate - then I can test it much easier for little while on production
> routers here.

Ah, but to have your SSHD to reply with IPv6 wild-card address
also as IPv4 wild-card should not harm you ?

Inside the Linux kernel there happens a magic layer transfer
from IPv6 socket to IPv4 transport, as the real TRANSPORT coming
in (and going out) is still IPv4, when the "incoming call" is
such. Same way, if you "call" IPv4 destination, you have two
choices:
- Create PF_INET socket and connect() to it with IPv4 address
- Create PF_INET6 socket and connect() to it with IPv4-Compatible
address
In both cases at your LAN you see IPv4 connection.

I have had my ZMailer software (SMTP server and client) to speak
dual-stack for ages -- the server listens at IPv6 wild-card, but
if the contactor is IPv4, the server converts received peer
address of ::ffff:xxx.xxx.xxx.xxx to IPv4 address, and does
classical IPv4 based analysis of things (like RBL lookups, et.al.)

> elmer.

/Matti Aarnio

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/