Page MenuHomeFreeBSD

bridge: add defvlanfilter and defuntagged options
AbandonedPublic

Authored by ivy on Jul 6 2025, 2:34 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Nov 7, 3:53 AM
Unknown Object (File)
Oct 25 2025, 1:14 AM
Unknown Object (File)
Oct 25 2025, 12:21 AM
Unknown Object (File)
Oct 23 2025, 5:15 PM
Unknown Object (File)
Oct 22 2025, 9:08 AM
Unknown Object (File)
Oct 12 2025, 5:54 PM
Unknown Object (File)
Oct 12 2025, 5:54 PM
Unknown Object (File)
Oct 12 2025, 6:24 AM

Details

Reviewers
des
kevans
pauamma_gundo.com
Group Reviewers
network
manpages
Summary

Add two non-interface-specific bridge parameters:

  • "flags" stores flags for the bridge itself. For now there is only one flag, IFBRF_DEFVLANFILTER, which causes newly added members to have IFBIF_VLANFILTER enabled by default.
  • "defpvid" sets the automatically assigned PVID for new members. If set to 0 (the default) then no PVID is assigned, which matches the current behaviour.

Expose both of these in ifconfig:

  1. ifconfig bridge0 defvlanfilter defuntagged 1

This has two benefits:

  • We avoid a race condition where a newly added bridge member would briefly have full VLAN access after BRDGADD finishes but before the vlan configuration can be applied.
  • VLAN-filtering bridges become easier to configure. In particular, setting "defvlanfilter defuntagged 1" makes the bridge conform to IEEE 802.1Q, while also allow existing tools which add/remove bridge members (such as bhyve/jail managers) to work unmodified.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 65235
Build 62118: arc lint + arc unit