Page MenuHomeFreeBSD

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

Authored by netchild on Fri, Sep 4, 1:52 PM.
Tags
None
Referenced Files
F170591368: D59391.diff
Sat, Sep 5, 1:27 PM
F170473425: D59391.id185821.diff
Sat, Sep 5, 12:03 AM
F170472606: D59391.diff
Fri, Sep 4, 11:59 PM
F170425247: D59391.id185821.diff
Fri, Sep 4, 6:47 PM
Subscribers

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;