IPV6_PKTINFO/recvfromto
Alan DeKok
aland at deployingradius.com
Sun Jan 16 08:17:57 CET 2011
Alexander Clouter wrote:
> Finally found the time to look into this, a clean v2.1.10 tree with the
> following cherry-picks:
> * e5c861665f00f1213036ba412b7092aac7159ad7 (contains bug)
> * fa0851d9235f04ff0d4161fc6f842857ff8d52aa
Thanks.
> The bug is fixed with the attached 0003-fix-recvpktinfo.patch, and then
> IPv6 is actually enabled with 0004-enable-ipv6.patch.
>
> For PKTINFO to work, Linux needs IPV6_RECVPKTINFO (or the legacy
> IPV6_2292PKTINFO) passed to setsockopt, however when you jump into
> sendmsg() cmsg->cmsg_type has to be IPV6_PKTINFO (or the legacy
> IPV6_2292PKTINFO); this is broken in the commit do to all the
> define/undef magic going on. I think I have sanitised it correctly.
OK. My only consideration here is tha IPV6_PKTINFO is a standard:
http://tools.ietf.org/html/rfc3542
and it's implemented on multiple operating systems. The weird #ifdef
magic was an attempt to make it work on Linux, which has 3-4 variants,
and *at the same time*, work on other platforms.
I'll take a look at it...
Alan DeKok.
More information about the Freeradius-Devel
mailing list