When the bridge fails to create a port group for a new MDB entry, the
entry is left behind with no ports and is never deleted, but it is still
counted towards mcast_hash_max. Since the introduction of
mcast_max_groups, a host behind a port that reached its maximum can use
this to exhaust the MDB and disable multicast snooping.

Patch #1 fixes the problem by deleting the entry upon failure.

Patch #2 adds a selftest.

Ido Schimmel (2):
  bridge: mcast: Delete empty MDB entry when port group creation fails
  selftests: forwarding: bridge_mdb_max: Add a test for rejected MDB
    entries

 net/bridge/br_mdb.c                           |  16 +-
 net/bridge/br_multicast.c                     |   9 ++
 net/bridge/br_private.h                       |   1 +
 .../net/forwarding/bridge_mdb_max.sh          | 138 ++++++++++++++++++
 4 files changed, 161 insertions(+), 3 deletions(-)

-- 
2.56.0


Reply via email to