HomeFreeBSD

usr.sbin/uhsoctl: correct SIOCDIFADDR calls to use ifreq

Description

usr.sbin/uhsoctl: correct SIOCDIFADDR calls to use ifreq

The SIOCDIFADDR ioctl takes an ifreq structure object, not an ifaliasreq
structure object, as its argument.

The ifreq structure does not include a separate mask field and the
SIOCDIFADDR ioctl handler does not require a network mask as opposed to
the ifaliasreq structure and the SIOCAIFADDR ioctl. Given that
SIOCAIFADDR and SIOCDIFADDR ioctls significantly differ and use
different structures for ioctl arguments, remove ifaddr_add() and move
its logic handling these ioctls to ifaddr_add()'s callers.

Reviewed by: brooks, jhb, oshogbo
Accepted by: oshogbo (mentor)
Obtained from: CheriBSD
Differential Revision: https://reviews.freebsd.org/D46019

Details

Provenance
defAuthored on Jun 28 2024, 10:29 AM
Reviewer
brooks
Differential Revision
D46019: usr.sbin/uhsoctl: correct SIOCDIFADDR calls to use ifreq
Parents
rGbc06c51419b3: netinet: correct SIOCDIFADDR{,_IN6} calls to use {,in6_}ifreq
Branches
Unknown
Tags
Unknown