HomeFreeBSD

bridge: Log MAC address port flapping

Description

bridge: Log MAC address port flapping

MAC flapping occurs when a bridge receives packets with the same source MAC
address on different member interfaces. The common reasons are:

  • user roams from one bridge port to another
  • user has wrong network setup, bridge loops e.g.
  • someone set duplicated ethernet address on his/her nic
  • some bad guy / virus / trojan send spoofed packets

if_bridge currently updates the bridge routing entry silently hence it is hard
to diagnose.

Emit logs when MAC address port flapping occurs to make it easier to diagnose.

Reviewed by: kp
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D39375
Differential Revision: https://reviews.freebsd.org/D39542

(cherry picked from commit 2d3614fb132b1cb8efd1e0accdd0c98ce6893efa)
(cherry picked from commit 9af6f4268ac3cc8203f34c746d955b4405279099)
(cherry picked from commit de53ebb0f20e9735a6167230eb38fd4695aa9c51)

Details

Provenance
zleiAuthored on Apr 7 2023, 2:25 PM
Reviewer
kp
Differential Revision
D39375: bridge: Log MAC address port flapping
Parents
rGd26e62ad16dc: printf.9: Update the use example of the %D conversion specifier
Branches
Unknown
Tags
Unknown