[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: USAGI IPv6 patches



¡Hola!

> > Attached is a patch adapted from USAGI that let us to bind different sockets
> > to the same port but different IP versions.

> Please, explain me one thing.

USAGI people (authors of the code) could probably explain it better. I'd just
extracted their work.

> So, you start listening port X on two wildcard tcp sockets. OK.
> What does pervent receiving ipv6 syns on v4 socket and vice versa?
> I see no new code. To me it looks like the second bind overrides
> the first one and the first socket is never used after this.

ipv6 syns aren't going to be received in v4 socket because tcp_v6_lookup_listener
will never choose something that is not a v6 socket:

        for(; sk; sk = sk->next) {
                if((sk->num == hnum) && (sk->family == PF_INET6)) {

And it seems that i overlooked the inverse case (and in the next patch i'll send to
you i'll correct it)

> > KAME people seems to want to deprecate IPv6 mapped address, and newer
> > versions don't let IPv6 sockets accept IPv4 connections. That's the MS
> > way too (they have IPv4 and IPv6 as fully different protocols)
> If this is truth, I would prefer to follow this way.

Ok, itojun has told us what's the KAME position (ie, fbsd[34] and bsdi have
same behaviour that usagi; obsd doesn't respect ipv4-mapped addresses because
security reasons; netbsd doesn't respect ipv4-mapped addresses unless told
to do so) MS IPv6 stack is fully isolated from IPv4 one:

   We chose to implement IPv6 in NT as a separate protocol stack from the
   existing IPv4 stack. This allows for ease of experimentation with IPv6
   without affecting existing IPv4 functionality.
  
(from http://www.research.microsoft.com/msripv6/)


What will we do? It seems that every implementations comply with RFC2553 (and
new drafts), but some are more cumbersome to work with that others. I'd prefer
going with the OpenBSD/NetBSD/Microsoft way, and be almost happy with the
FBSD/BSDI one. But if i do a getaddrinfo i should be able to bind to every
sockaddr that's returned unless somebody else had bind on something that
overlaps with my wishes. Ignoring bind returning EINVAL is not something i
can be happy with.

You're the one in charge of linux networking, you decides.

> Alexey

					HoraPe
---
Horacio J. Peña
horape@compendium.com.ar
horape@uninet.edu
bofh@puntoar.net.ar
horape@hcdn.gov.ar



Reply to: