Page MenuHomeFreeBSD

bridge: refactor local packet handling
Needs ReviewPublic

Authored by ivy on Jul 11 2025, 12:15 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Aug 3, 7:56 AM
Unknown Object (File)
Fri, Jul 25, 5:15 AM
Unknown Object (File)
Fri, Jul 25, 4:27 AM
Unknown Object (File)
Thu, Jul 24, 5:37 AM
Unknown Object (File)
Sat, Jul 12, 12:36 AM

Details

Reviewers
des
kevans
Group Reviewers
network
Summary

Remove the GRAB_OUR_PACKETS() macro and sprinkle its remains over
bridge_input():

  • check much earlier if we should punt the packet to vlan(4), or if it's filtered by pfil, or if we need to learn the address.
  • actual local packet handling is moved to a new function, bridge_try_local().

While here, change handling of frames received from discarding (STP)
ports to drop the frames instead of passing them to the host IP stack.

Diff Detail

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

Event Timeline

ivy requested review of this revision.Jul 11 2025, 12:15 PM

no need to call bridge_rtupdate() in bridge_forward() now

improve code a little; add more comments; ensure the bif is set correctly for netmap-injected frames

change the order of input processing: do filtering, then monitoring, then span,
so monitor and span see the same frames and don't see filtered frames.

improve some comments.

fix the member_ifaddrs_enabled test (the bridge needs to be up to pass frames now).