Commit ac3208fb authored by David S. Miller's avatar David S. Miller

Merge branch 'net-bridge-mc-cleanups'

Ido Schimmel says:

====================
bridge: A few multicast cleanups

Clean up a few issues spotted while working on the bridge multicast code
and running its selftests.
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 5cacb2c7 d1942cd4
......@@ -866,7 +866,6 @@ static int br_mdb_add_group(struct net_bridge *br, struct net_bridge_port *port,
unsigned long now = jiffies;
unsigned char flags = 0;
u8 filter_mode;
int err;
__mdb_entry_to_br_ip(entry, &group, mdb_attrs);
......@@ -892,13 +891,9 @@ static int br_mdb_add_group(struct net_bridge *br, struct net_bridge_port *port,
return -EINVAL;
}
mp = br_mdb_ip_get(br, &group);
if (!mp) {
mp = br_multicast_new_group(br, &group);
err = PTR_ERR_OR_ZERO(mp);
if (err)
return err;
}
mp = br_multicast_new_group(br, &group);
if (IS_ERR(mp))
return PTR_ERR(mp);
/* host join */
if (!port) {
......
......@@ -2669,7 +2669,7 @@ static int br_ip4_multicast_igmp3_report(struct net_bridge_mcast *brmctx,
if (!pmctx || igmpv2)
continue;
spin_lock_bh(&brmctx->br->multicast_lock);
spin_lock(&brmctx->br->multicast_lock);
if (!br_multicast_ctx_should_use(brmctx, pmctx))
goto unlock_continue;
......@@ -2717,7 +2717,7 @@ static int br_ip4_multicast_igmp3_report(struct net_bridge_mcast *brmctx,
if (changed)
br_mdb_notify(brmctx->br->dev, mdst, pg, RTM_NEWMDB);
unlock_continue:
spin_unlock_bh(&brmctx->br->multicast_lock);
spin_unlock(&brmctx->br->multicast_lock);
}
return err;
......@@ -2807,7 +2807,7 @@ static int br_ip6_multicast_mld2_report(struct net_bridge_mcast *brmctx,
if (!pmctx || mldv1)
continue;
spin_lock_bh(&brmctx->br->multicast_lock);
spin_lock(&brmctx->br->multicast_lock);
if (!br_multicast_ctx_should_use(brmctx, pmctx))
goto unlock_continue;
......@@ -2859,7 +2859,7 @@ static int br_ip6_multicast_mld2_report(struct net_bridge_mcast *brmctx,
if (changed)
br_mdb_notify(brmctx->br->dev, mdst, pg, RTM_NEWMDB);
unlock_continue:
spin_unlock_bh(&brmctx->br->multicast_lock);
spin_unlock(&brmctx->br->multicast_lock);
}
return err;
......
......@@ -96,9 +96,6 @@ cleanup()
switch_destroy
# Always cleanup the mcast group
ip address del dev $h2 $TEST_GROUP/32 2>&1 1>/dev/null
h2_destroy
h1_destroy
......
......@@ -59,6 +59,9 @@ switch_create()
switch_destroy()
{
tc qdisc del dev $swp2 clsact
tc qdisc del dev $swp1 clsact
ip link set dev $swp2 down
ip link set dev $swp1 down
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment