HomeFreeBSD

iflib: allow clone detach if not yet init

Description

iflib: allow clone detach if not yet init

If we hit an error during init, then we'll unwind our state and attempt
to detach the device -- don't block it.

This was discovered by creating a wg0 with missing parameters; said
failure ended up leaving this orphaned device in place and ended up
panicking the system upon enumeration of the dev.* sysctl space.

Reviewed by: gallatin, markj
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D29145

Details

Provenance
kevansAuthored on Mar 9 2021, 12:13 PM
Reviewer
gallatin
Differential Revision
D29145: iflib: allow clone detach if not yet init
Parents
rG299f8977cef6: if_wg: wg_input: remove a couple locals (NFC)
Branches
Unknown
Tags
Unknown