bridge: mcast: Do not derive entry type from its filter mode
authorIdo Schimmel <idosch@nvidia.com>
Sat, 10 Dec 2022 14:56:20 +0000 (16:56 +0200)
committerJakub Kicinski <kuba@kernel.org>
Mon, 12 Dec 2022 23:33:36 +0000 (15:33 -0800)
commitb63e30651c59bdef89ec158879d146e8d89cd5e1
tree1d2a3f5d334ddd5a5eb6163ebea88dfe3273aadd
parent02abf84aa52da86586ec6323969afa158ec6e4aa
bridge: mcast: Do not derive entry type from its filter mode

Currently, the filter mode (i.e., INCLUDE / EXCLUDE) of MDB entries
cannot be set from user space. Instead, it is set by the kernel
according to the entry type: (*, G) entries are treated as EXCLUDE and
(S, G) entries are treated as INCLUDE. This allows the kernel to derive
the entry type from its filter mode.

Subsequent patches will allow user space to set the filter mode of (*,
G) entries, making the current assumption incorrect.

As a preparation, remove the current assumption and instead determine
the entry type from its key, which is a more direct way.

Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Acked-by: Nikolay Aleksandrov <razor@blackwall.org>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/bridge/br_mdb.c