Page MenuHomeFreeBSD

Delete SIOCSIFALIFETIME_IN6 as done in NetBSD
ClosedPublic

Authored by pfg on Feb 29 2016, 3:05 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Dec 6, 7:51 AM
Unknown Object (File)
Sep 30 2024, 2:08 PM
Unknown Object (File)
Sep 29 2024, 11:24 PM
Unknown Object (File)
Sep 24 2024, 3:00 PM
Unknown Object (File)
Sep 19 2024, 3:44 PM
Unknown Object (File)
Sep 8 2024, 2:56 AM
Unknown Object (File)
Aug 31 2024, 12:25 AM
Unknown Object (File)
Aug 27 2024, 4:26 AM
Subscribers

Details

Summary

Quoted from NetBSD kern/35897:

The KAME code provided an ioctl to set the lifetimes of
an IPv6 address - that is, SIOCSIFALIFETIME_IN6 (it also
provides one to fetch those lifetimes, which does not quite
have the problem described below, but is very ugly because of
the same issue).

The arg data to SIOCSIFALIFETIME_IN6 is the fairly generic
struct in6_ifreq that handles lots of IPv6 ioctl data.

The problem is, that this general interface provides just the
interface name, and the ioctl specific data (which in this case
is the ifru_lifetime field in the ifr_ifru union. ifru_lifetime
contains everything necessary to set the lifetimes for an
address - except which address they're to be set for...

As a specific address is needed, the v6 address ioctl
code simply uses the ifru_addr of the in6_ifreq to select
the address to which the ioctl is to apply.

Unfortunately, ifr_ifru is a union, ifru_addr and ifru_lifetime
occupy the same bits in the request. Unless the lifetimes
that need to be set just happen to bear a startling resemblance
to the address to which they are to be applied, this cannot
possibly work.

Please check:
http://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=35897

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

pfg retitled this revision from to Delete SIOCSIFALIFETIME_IN6 as done in NetBSD.
pfg updated this object.
pfg edited the test plan for this revision. (Show Details)

It looks like the problem can be fixed by using struct in6_aliasreq as ioctl argument instead of in6_ifreq. But probably it isn't needed since SIOCAIFADDR_IN6 does what SIOCSIFALIFETIME_IN6 should do.

ping ...

Perhaps this should be done for 11, and not later?

ae added a reviewer: ae.

I think if you want completely remove it, you need to check that this will not break the build of ports.
Or you can leave definition and just return EOPNOTSUPP when it is invoked.

This revision is now accepted and ready to land.Jun 8 2016, 9:39 AM
hrs edited edge metadata.

I think removing the ioctl including the symbol makes sense after doing an exp-run of package build as ae@ pointed out.

Results form exp-run are good:

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=210148

Antoine Brodin freebsd_committer 2016-06-10 17:13:05 UTC
Exp-run looks fine, 0 new failure on headamd64


Request pending re@ approval.

This revision was automatically updated to reflect the committed changes.