sks-devel
[Top][All Lists]
Advanced

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

Re: [Sks-devel] [PATCH] IPv6 support


From: Phil Pennock
Subject: Re: [Sks-devel] [PATCH] IPv6 support
Date: Mon, 9 Mar 2009 00:25:45 -0700

On 2009-03-07 at 12:53 -0500, Yaron Minsky wrote:
> On Sat, Mar 7, 2009 at 2:53 AM, Phil Pennock <address@hidden>wrote:
> > So, is there an easy way to detect from OCaml if there's a routable IPv6
> > service available, or should we provide knobs to disable IPv4 or IPv6?
> >
> > In C, I'd use
> >  addrinfo_obj.ai_flags |= AI_ADDRCONFIG
> > for the getaddrinfo() call, so that addresses are only returned for
> > those address families for which such an address is configured on the
> > local system.  I couldn't see a way to do that in O'Caml.  I'm running
> > 3.10.2 (FreeBSD port, ocaml-notk-3.10.2_1) and the socket handling in
> > unix.mli leaves somewhat to be desired, both in setsockopt for anything
> > other than socket-level options and flags for some of the newer
> > interfaces such as getaddrinfo().  :-/
> 
> 
> This is the part I need to think about.  I actually know next to nothing
> about IPv6.  I really only looked at the code for very broad readability
> issues.
> 
> You should take a look at 3.11 and see if it fixes any of your issues.
> That's what I"m currently compiling against.

I go with whatever FreeBSD Ports ships as the stable version.  But I
just downloaded 3.11.0 and looked.

 (1) otherlibs/unix/sockopt.c has been overhauled and now supports
     options at different levels, but it still has to be from a
     hardcoded table of options; IPPROTO_IPV6/IPV6_V6ONLY is present,
     but no other relevant options.

     So with OCaml 3.11, Kim's patch could be adjusted to let it work on
     any platform which supports non-V6ONLY IPv6 sockets.

 (2) otherlibs/unix/getaddrinfo.c doesn't support AI_ADDRCONFIG; it
     looks like it needs an addition to unix.{ml,mli} and then an extra
     case in a switch block in getaddrinfo_option().

In general, the IPv6 support looks like it has "enough to get working
sockets up" but not enough to demonstrate that it's been used in any
serious way.

It looks like the most stable way forward, without creating maintenance
problems, is going to be a Settings.disable_ipv6 so that those who use a
system without IPv6 configured up can at least manually disable it.

-Phil




reply via email to

[Prev in Thread] Current Thread [Next in Thread]