Page MenuHomeFreeBSD

if_bridge(4): ensure all traffic passing over the bridge is accounted for
ClosedPublic

Authored by kevans on Mar 17 2019, 7:39 PM.
Tags
None
Referenced Files
F106127825: D19614.id55171.diff
Wed, Dec 25, 8:53 PM
F106126858: D19614.id55524.diff
Wed, Dec 25, 8:27 PM
F106098933: D19614.diff
Wed, Dec 25, 9:26 AM
Unknown Object (File)
Sep 13 2024, 2:03 PM
Unknown Object (File)
Sep 8 2024, 6:27 PM
Unknown Object (File)
Sep 8 2024, 7:54 AM
Unknown Object (File)
Sep 7 2024, 8:44 PM
Unknown Object (File)
Aug 31 2024, 7:28 PM
Subscribers

Details

Summary

Consider a bridge0 with em0 and em1 members. Traffic rx'd by em0 and transmitted by bridge0 through em1 gets accounted for in IPACKETS/IBYTES and bridge0 bpf -- assuming it's not unicast traffic destined for em1. Unicast traffic destined for em1 traffic is not accounted for by any mechanism, and isn't pushed through bridge0's bpf machinery as any other packets that pass over the bridge do.

Fix this and simplify GRAB_OUR_PACKETS by bailing out early if it was rx'd by the interface that it was addressed for. Everything else there is relevant for any traffic that came in from one member that's being directed at another member of the bridge -- it should be visible via bpf on the bridge, it should increment IPACKETS/IBYTES because the traffic -is- flowing over the bridge, and it should go ahead and trigger on the physical interface because it's locally destined traffic.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 23146