[radvd-devel-l] radvd for NetBSD/KAME-current

Nathan Lutchansky radvd-devel-l@litech.org
Sat, 22 Jun 2002 13:52:19 -0400 (EDT)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Sat, 15 Jun 2002, Pekka Savola wrote:

> On Fri, 14 Jun 2002, SUGYO Kazushi wrote:
> > Hello,
> > 
> > Here is a small patch for radvd-0.7.1.
> 
> 1) Should these changes be also made to recv.c:recv_rs_ra() ?

I don't think so...  Here's the relevant part of section 6.3 of
draft-ietf-ipngwg-rfc2292bis-07:

   The received hop limit is returned as ancillary data by recvmsg()
   only if the application has enabled the IPV6_RECVHOPLIMIT socket
   option:

       int  on = 1;
       setsockopt(fd, IPPROTO_IPV6, IPV6_RECVHOPLIMIT, &on, sizeof(on));

   In the cmsghdr structure containing this ancillary data, the
   cmsg_level member will be IPPROTO_IPV6, the cmsg_type member will be
   IPV6_HOPLIMIT, and the first byte of cmsg_data[] will be the first
   byte of the integer hop limit.

So changing the option from IPV6_HOPLIMIT to IPV6_RECVHOPLIMIT applies 
only to the setsockopt call, not to the tagging of the recvmsg data.

> 2) Opinions whether the attached kind of approach would be too confusing 
> (Nathan?) -- this would limit the need for ifdefs in the code.

I think it's fine with the ifdefs.  It's not like open_icmpv6_socket() has 
any complex control logic.  Plus, I would expect that entire function to 
be loaded with platform-specific logic, due to the numerous revs that RFC 
2292 has gone through.  -Nathan
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE9FLlVTviDkW8mhycRAnI5AKCP6ru/awm+rAyj0UG0kjR2yOot1QCePpBx
BtW/fvo3wHUEC2EXL///lgM=
=eAzX
-----END PGP SIGNATURE-----