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)