diff options
author | Petr Machata <petrm@nvidia.com> | 2023-02-02 20:59:22 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2023-02-06 11:48:25 +0300 |
commit | 976b3858dd14914c5a9254535ad7440c99467944 (patch) | |
tree | b25a0715b91870b865ea5fd45c33d37a0e0ca258 /net/bridge/br_mdb.c | |
parent | 1c85b80b20a13d07ec3a7d746ad52b7972c8c730 (diff) | |
download | linux-976b3858dd14914c5a9254535ad7440c99467944.tar.xz |
net: bridge: Add br_multicast_del_port_group()
Since cleaning up the effects of br_multicast_new_port_group() just
consists of delisting and freeing the memory, the function
br_mdb_add_group_star_g() inlines the corresponding code. In the following
patches, number of per-port and per-port-VLAN MDB entries is going to be
maintained, and that counter will have to be updated. Because that logic
is going to be hidden in the br_multicast module, introduce a new hook
intended to again remove a newly-created group.
Signed-off-by: Petr Machata <petrm@nvidia.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Acked-by: Nikolay Aleksandrov <razor@blackwall.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge/br_mdb.c')
-rw-r--r-- | net/bridge/br_mdb.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/bridge/br_mdb.c b/net/bridge/br_mdb.c index 139de8ac532c..9f22ebfdc518 100644 --- a/net/bridge/br_mdb.c +++ b/net/bridge/br_mdb.c @@ -1099,8 +1099,7 @@ static int br_mdb_add_group_star_g(const struct br_mdb_config *cfg, return 0; err_del_port_group: - hlist_del_init(&p->mglist); - kfree(p); + br_multicast_del_port_group(p); return err; } |