[ITP] tftp-hpa 5.0

Corinna Vinschen corinna-cygwin@cygwin.com
Tue Oct 5 07:33:00 GMT 2010


On Oct  4 17:13, Charles Wilson wrote:
> On 10/4/2010 2:27 PM, Corinna Vinschen wrote:
> > On Oct  4 13:13, Charles Wilson wrote:
> >> Well, that's basically what happens already.  Incoming V4 packets get
> >> turned into AI_V4MAPPED ones, always, IIRC -- when the socket was set
> >> for both V4 and V6.
> > 
> > Erm... hang on.  A socket is created for only one domain/address family,
> > AF_INET, AF_UNIX, AF_INET6.  There's no such thing as a socket supporting
> > more than one address family or more than one socket type (stream/dgram).
> 
> I guess what I should have said, was that: when you open a socket for
> AF_INET6, and you do NOT setsockopt IPV6_V6ONLY (on Vista+, where
> dualstack sockets are the default), then you get v4-in-v6 mapping for
> incoming v4 packets.

Uh, right.  I forgot about that scenario, sorry.

> I forgot to mention that the problems I ran into were exposed only on
> Vista+, XP- didn't display them: I believe the difference is that Vista
> was where support for dualstack sockets was added -- so obviously this
> issue wasn't a problem on pre-Vista.

Indeed, the IPV6_V6ONLY option was not supported pre-Vista, either.

> I think xinetd's IPv6 support is written so that it doesn't need
> dualstack support; it uses separate sockets for IPv6 and IPv4 (but on
> Vista, with dualstack support, all the incoming IPv4 packets show up on
> the IPv6 socket, as v4-in-v6, instead of on the IPv4 socket.  IIRC.)
> 
> Maybe xinetd should be modified so that IPv6 sockets are in IPV6_V6ONLY
> -- but then any v4-in-v6 packets that some OTHER router wrapped might
> get dropped?  What a pain.

Hmm, I don't think that this is a problem.  In theory, if you didn't use
the IPV6_V6ONLY option, you shouldn't have been able to bind a IPv4
socket to the same port.  At least that's how it's implemented on Linux,
afaik.  If Windows allows it, it's certainly Windows-specific.  Given
the Linux behaviour, if xinetd binds an IPv4 and an IPv6 socket to the
same port without using IPV6_V6ONLY is kind of a bug.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat



More information about the Cygwin-apps mailing list