Page MenuHomeFreeBSD

if_bridge: count the packets bridge_pfil() drops on error
Needs ReviewPublic

Authored by netchild on Fri, Sep 4, 1:52 PM.

Details

Summary

bridge_pfil() dropped a packet on error paths without incrementing
the error counter:

  • a failed m_pullup() or M_PREPEND(),
  • a malformed header,
  • a fragmentation failure

Route those exits through the existing bad: label and bump the filtered
interface's input or output error counter.

Also add error counter handling in bridge_fragment().

Assisted-by: Claude Code (Fable 5)

Diff Detail

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

Event Timeline

netchild held this revision as a draft.
netchild published this revision for review.Fri, Sep 4, 1:53 PM

The following part may need to get a rework for this change... investigating...

		default:
			if (V_pfil_onlyip)
				goto bad;