pcp
[Top] [All Lists]

Re: [pcp] IPv6 conditional

To: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>
Subject: Re: [pcp] IPv6 conditional
From: Nathan Scott <nathans@xxxxxxxxxx>
Date: Fri, 22 Mar 2013 02:15:31 -0400 (EDT)
Cc: PCP <pcp@xxxxxxxxxxx>
Delivered-to: pcp@xxxxxxxxxxx
In-reply-to: <514AAB1A.9060101@xxxxxxxxxxxxxxxx>
Reply-to: Nathan Scott <nathans@xxxxxxxxxx>
Hi Ken,

----- Original Message -----
> In pmconfig we assert that IPv6 is always enabled for builds from PCP
> 3.6.11 on.
> 
> But what if the kernel does not have IPv6 support, e.g. on Gentoo
> 
> $ cat /proc/net/if_inet6
> cat: /proc/net/if_inet6: No such file or directory

Hmm.  Yeah, we should do better.

> or the ipv6 kernel module is not loaded/built-in on Linux, or
> goodness knows what on the non-Linux systems.

For non-Linux (Win32 and Mac at least, but I expect *BSD & Solaris)
I'd be very surprised if they do not have IPv6 enabled out of the box
- certainly Windows and Mac are known to support it by default.

> Seems like we need to be much smarter here (a) in the build, or (b)
> at run-time or (c) both.
> 

Since its most likely to be the less mainstream Linux distributions,
I think, how about we turn the pmconfig test into a runtime check on
existence of that procfs file?  (guarded by "ifdef IS_LINUX" I guess)
Sounds like that will work for all of the failing cases you're seeing
and probably almost all in practice - any others that come along can
be special-cased as well.

cheers.

--
Nathan

<Prev in Thread] Current Thread [Next in Thread>