Page MenuHomeFreeBSD

bridge: fix vlan(4) on a bridge member
ClosedPublic

Authored by ivy on May 31 2025, 5:05 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Nov 5, 10:56 AM
Unknown Object (File)
Wed, Nov 5, 10:56 AM
Unknown Object (File)
Wed, Nov 5, 10:55 AM
Unknown Object (File)
Oct 14 2025, 3:57 PM
Unknown Object (File)
Oct 4 2025, 5:40 AM
Unknown Object (File)
Oct 3 2025, 11:45 AM
Unknown Object (File)
Oct 3 2025, 11:20 AM
Unknown Object (File)
Sep 26 2025, 7:30 PM

Details

Summary

If an interface is a bridge member, and a vlan(4) is also created on
that interface, and net.link.bridge.member_ifaddrs=0, then vlan(4)
will never see any incoming frames because bridge doesn't pass them
to the host for processing.

Work around this by checking for locally-addressed frames using the
MAC address of the interface we received the frame on, but only if
the frame has a .1q tag and there's a vlan trunk on the interface.

This behaviour is almost certainly "wrong" and it's not clear if we
really want to support this, but it did work in the past and the
member_ifaddrs change was not supposed to break it, so this restores
the previous behaviour.

PR: 287150
Tested by: Marek Zarychta <zarychtam@plan-b.pwste.edu.pl>
MFC after: 1 week

Diff Detail

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

Event Timeline

ivy requested review of this revision.May 31 2025, 5:05 AM

a better fix for this would be to check in bridge_input if the frame has a tag and there's a vlan trunk, and if so immediately return it to ether_input. however this change is intended to preserve the existing behaviour (prior to member_ifaddrs) so it can be MFC'd to stable/14 with less risk of breaking something else.

This revision is now accepted and ready to land.May 31 2025, 12:33 PM
This revision was automatically updated to reflect the committed changes.