HomeFreeBSD

Fix netdump configuration when VIMAGE is enabled.

Description

Fix netdump configuration when VIMAGE is enabled.

We need to set the current vnet before iterating over the global
interface list. Because the dump device may only be set from the host,
only proceed with configuration if the thread belongs to the default
vnet. [1]

Also fix a resource leak that occurs if the priv_check() in set_dumper()
fails.

Reported by: mmacy, sbruno [1]
Reviewed by: sbruno
X-MFC with: r333283
Differential Revision: https://reviews.freebsd.org/D15449

Details

Provenance
markjAuthored on
Reviewer
sbruno
Differential Revision
D15449: Use the thread's vnet when iterating over interfaces.
Parents
rS333701: Fix powerpc64 LINT
Branches
Unknown
Tags
Unknown