]> git.baikalelectronics.ru Git - kernel.git/commit
net: bridge: mdb: move all port and bridge checks to br_mdb_add
authorNikolay Aleksandrov <nikolay@nvidia.com>
Tue, 22 Sep 2020 07:30:13 +0000 (10:30 +0300)
committerDavid S. Miller <davem@davemloft.net>
Wed, 23 Sep 2020 20:24:34 +0000 (13:24 -0700)
commit7eea629d07d459dfece80648c7f47f07498fdc9e
treec03ff6585680236a8e51ffa3f68d228678123d30
parent2ac95dfe25229b13dda95b404004b9c93815c7f9
net: bridge: mdb: move all port and bridge checks to br_mdb_add

To avoid doing duplicate device checks and searches (the same were done
in br_mdb_add and __br_mdb_add) pass the already found port to __br_mdb_add
and pull the bridge's netif_running and enabled multicast checks to
br_mdb_add. This would also simplify the future extack errors.

Signed-off-by: Nikolay Aleksandrov <nikolay@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/bridge/br_mdb.c