selftests: forwarding: Add MAC Authentication Bypass (MAB) test cases
authorHans J. Schultz <netdev@kapio-technology.com>
Tue, 1 Nov 2022 19:39:22 +0000 (21:39 +0200)
committerJakub Kicinski <kuba@kernel.org>
Fri, 4 Nov 2022 03:46:32 +0000 (20:46 -0700)
commit4a331d3469963b5db37d462963397a8fe52aace0
tree6adaa68a513147ae241c67ff4e317e3284f82db1
parenta35ec8e38cdd1766f29924ca391a01de20163931
selftests: forwarding: Add MAC Authentication Bypass (MAB) test cases

Add four test cases to verify MAB functionality:

* Verify that a locked FDB entry can be generated by the bridge,
  preventing a host from communicating via the bridge. Test that user
  space can clear the "locked" flag by replacing the entry, thereby
  authenticating the host and allowing it to communicate via the bridge.

* Test that an entry cannot roam to a locked port, but that it can roam
  to an unlocked port.

* Test that MAB can only be enabled on a port that is both locked and
  has learning enabled.

* Test that locked FDB entries are flushed from a port when MAB is
  disabled.

Signed-off-by: Hans J. Schultz <netdev@kapio-technology.com>
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Acked-by: Nikolay Aleksandrov <razor@blackwall.org>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/net/forwarding/bridge_locked_port.sh
tools/testing/selftests/net/forwarding/lib.sh