Page MenuHomeFreeBSD

if_vlan: Fix up the if_type prior to attaching the interface
ClosedPublic

Authored by zlei on Jun 18 2025, 4:58 AM.
Tags
None
Referenced Files
F132693772: D50914.diff
Sun, Oct 19, 2:50 AM
Unknown Object (File)
Sat, Oct 18, 8:03 AM
Unknown Object (File)
Sat, Oct 18, 3:02 AM
Unknown Object (File)
Fri, Oct 17, 6:26 PM
Unknown Object (File)
Tue, Oct 14, 9:17 AM
Unknown Object (File)
Thu, Oct 9, 2:09 PM
Unknown Object (File)
Sat, Oct 4, 4:16 AM
Unknown Object (File)
Sat, Sep 27, 4:20 PM

Details

Summary

ether_ifattach() does not touch if_type. This change will ensure that the
event listener, e.g. ifnet_arrival_event, see the right interface
type. Also other threads will see consistent interface type.

As a nice effect, this change eliminates the memory allocation for
if_hw_addr, since vlan(4) interfaces do not support setting or
retrieving the hardware MAC address yet [1].

[1] ddae57504b79 Persistently store NIC's hardware MAC address, and add a way to retrive it

MFC after: 1 week

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable