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
Unknown Object (File)
Fri, Jun 12, 6:12 PM
Unknown Object (File)
Mon, May 25, 8:13 PM
Unknown Object (File)
Thu, May 21, 12:04 PM
Unknown Object (File)
Wed, May 20, 6:21 AM
Unknown Object (File)
Apr 28 2026, 8:56 PM
Unknown Object (File)
Apr 24 2026, 12:10 AM
Unknown Object (File)
Apr 20 2026, 7:47 AM
Unknown Object (File)
Apr 20 2026, 3:19 AM

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