Skip to content

Commit 4950cfd

Browse files
Nikolay Aleksandrovdavem330
authored andcommitted
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 7f0aec7 commit 4950cfd

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

net/bridge/br_multicast.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1853,7 +1853,10 @@ int br_multicast_set_port_router(struct net_bridge_port *p, unsigned long val)
18531853
int err = -EINVAL;
18541854

18551855
spin_lock(&br->multicast_lock);
1856-
1856+
if (p->multicast_router == val) {
1857+
err = 0;
1858+
goto unlock;
1859+
}
18571860
switch (val) {
18581861
case MDB_RTR_TYPE_DISABLED:
18591862
p->multicast_router = MDB_RTR_TYPE_DISABLED;

0 commit comments

Comments
 (0)