HomeFreeBSD

ifnet: Move SIOCSIFVNET from ifhwioctl() to ifioctl()

Description

ifnet: Move SIOCSIFVNET from ifhwioctl() to ifioctl()

SIOCSIFVNET is not a hardware ioctl. Move it to where it belongs.

Where here, rewrite the logic of checking whether we are moving the
interface from and to the same vnet or not, since it is obviously not
stable to access the interface's vnet, given the current thread may
race with other threads those running if_vmove().

MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D55880

(cherry picked from commit 38bd7ef62f318f791e232e217855307a9d75efa0)

Details

Provenance
zleiAuthored on Apr 13 2026, 4:38 AM
Differential Revision
D55880: ifnet: Move SIOCSIFVNET from ifhwioctl() to ifioctl()
Parents
rGccfc2d91304e: ifnet: vnet_if_return(): Avoid unnecessary recursive acquisition of…
Branches
Unknown
Tags
Unknown