summaryrefslogtreecommitdiffstats
path: root/net/bridge/br_multicast.c
diff options
context:
space:
mode:
authorNikolay Aleksandrov <nikolay@cumulusnetworks.com>2016-02-26 21:20:02 +0100
committerDavid S. Miller <davem@davemloft.net>2016-03-01 16:55:07 -0500
commit4950cfd1e6a85b5e079a78f19792e6ec54199170 (patch)
treef5c7fed1ade3dfea8f50b3bd8b9cc98a4b4f141a /net/bridge/br_multicast.c
parent7f0aec7a668419bdbff12de6e8016544f874e708 (diff)
downloadlinux-4950cfd1e6a85b5e079a78f19792e6ec54199170.tar.gz
linux-4950cfd1e6a85b5e079a78f19792e6ec54199170.tar.bz2
linux-4950cfd1e6a85b5e079a78f19792e6ec54199170.zip
bridge: mcast: do nothing if port's multicast_router is set to the same val
This is needed for the upcoming temporary port router. There's no point to go through the logic if the value is the same. Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge/br_multicast.c')
-rw-r--r--net/bridge/br_multicast.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c
index 71c109b0943f..f1140cf5168d 100644
--- a/net/bridge/br_multicast.c
+++ b/net/bridge/br_multicast.c
@@ -1853,7 +1853,10 @@ int br_multicast_set_port_router(struct net_bridge_port *p, unsigned long val)
int err = -EINVAL;
spin_lock(&br->multicast_lock);
-
+ if (p->multicast_router == val) {
+ err = 0;
+ goto unlock;
+ }
switch (val) {
case MDB_RTR_TYPE_DISABLED:
p->multicast_router = MDB_RTR_TYPE_DISABLED;