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)
Mar 23 2024, 1:41 AM
Unknown Object (File)
Jan 8 2024, 6:43 AM
Unknown Object (File)
Jan 8 2024, 6:43 AM
Unknown Object (File)
Dec 20 2023, 12:18 AM
Unknown Object (File)
Nov 11 2023, 10:23 PM
Unknown Object (File)
Nov 9 2023, 6:20 AM
Unknown Object (File)
Nov 6 2023, 11:35 PM
Unknown Object (File)
Oct 10 2023, 9:13 PM
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.