HomeFreeBSD

ifnet: Assert that we are assigning network stack correctly

Description

ifnet: Assert that we are assigning network stack correctly

It makes no sense to assign NULL vnet to an interface when the kernel
option VIMAGE is enabled. Add an assertion to catch that.

This will also help diagnosing problem report [1] and [2].

  1. https://bugs.freebsd.org/275381
  2. https://bugs.freebsd.org/282168

Reviewed by: kp
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D46982

Details

Provenance
zleiAuthored on Oct 22 2024, 4:32 AM
Reviewer
kp
Differential Revision
D46982: ifnet: Assert that we are assigning network stack correctly
Parents
rGcaa309c8811d: nfsd: Fix handling of credentials with cr_ngroups == 0
Branches
Unknown
Tags
Unknown