HomeFreeBSD

Document and enforce assumptions about struct (in6_)ifreq.

Description

Document and enforce assumptions about struct (in6_)ifreq.

  • The two types must be type-punnable for shared members of ifr_ifru. This allows compatibility accessors to be shared.
  • There must be no padding gap between ifr_name and ifr_ifru. This is assumed in tcpdump's use of SIOCGIFFLAGS output which attempts to be broadly portable. This is true for all current architectures, but very large (256-bit) fat-pointers could violate this invariant.

Reviewed by: kib
Obtained from: CheriBSD
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D14910

Details

Provenance
brooksAuthored on
Reviewer
kib
Differential Revision
D14910: Document and enforce assumptions about struct (in6_)ifreq.
Parents
rS331830: Add deprecation notices for Arcnet and FDDI drivers.
Branches
Unknown
Tags
Unknown