summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSatish Ashok <sashok@cumulusnetworks.com>2015-06-19 01:22:57 -0700
committerZefan Li <lizefan@huawei.com>2015-10-22 09:20:06 +0800
commite2b3a182f87e27d44bc95dcb1d005bc4191ea7e1 (patch)
tree207d8835d1b8cbf25e3fc47e3109f7622072505a
parentdd7ad96cc31ad681593e41e5e0cfbd9752ee9f34 (diff)
downloadlwn-e2b3a182f87e27d44bc95dcb1d005bc4191ea7e1.tar.gz
lwn-e2b3a182f87e27d44bc95dcb1d005bc4191ea7e1.zip
bridge: multicast: restore router configuration on port link down/up
commit 754bc547f0a79f7568b5b81c7fc0a8d044a6571a upstream. When a port goes through a link down/up the multicast router configuration is not restored. Signed-off-by: Satish Ashok <sashok@cumulusnetworks.com> Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com> Fixes: 0909e11758bd ("bridge: Add multicast_router sysfs entries") Acked-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net> [lizf: Backported to 3.4: adjust context] Signed-off-by: Zefan Li <lizefan@huawei.com>
-rw-r--r--net/bridge/br_multicast.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c
index a41051a1bca5..87ae8c30ab41 100644
--- a/net/bridge/br_multicast.c
+++ b/net/bridge/br_multicast.c
@@ -36,6 +36,9 @@
#define mlock_dereference(X, br) \
rcu_dereference_protected(X, lockdep_is_held(&br->multicast_lock))
+static void br_multicast_add_router(struct net_bridge *br,
+ struct net_bridge_port *port);
+
#if IS_ENABLED(CONFIG_IPV6)
static inline int ipv6_is_transient_multicast(const struct in6_addr *addr)
{
@@ -842,6 +845,8 @@ void br_multicast_enable_port(struct net_bridge_port *port)
goto out;
__br_multicast_enable_port(port);
+ if (port->multicast_router == 2 && hlist_unhashed(&port->rlist))
+ br_multicast_add_router(br, port);
out:
spin_unlock(&br->multicast_lock);