diff options
Diffstat (limited to 'net/bridge/br_multicast.c')
-rw-r--r-- | net/bridge/br_multicast.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c index 27ae946363f1..eb5b256ffc88 100644 --- a/net/bridge/br_multicast.c +++ b/net/bridge/br_multicast.c | |||
@@ -1435,7 +1435,7 @@ static int br_multicast_ipv6_rcv(struct net_bridge *br, | |||
1435 | struct icmp6hdr *icmp6h; | 1435 | struct icmp6hdr *icmp6h; |
1436 | u8 nexthdr; | 1436 | u8 nexthdr; |
1437 | unsigned len; | 1437 | unsigned len; |
1438 | unsigned offset; | 1438 | int offset; |
1439 | int err; | 1439 | int err; |
1440 | 1440 | ||
1441 | if (!pskb_may_pull(skb, sizeof(*ip6h))) | 1441 | if (!pskb_may_pull(skb, sizeof(*ip6h))) |
@@ -1728,13 +1728,9 @@ unlock: | |||
1728 | int br_multicast_toggle(struct net_bridge *br, unsigned long val) | 1728 | int br_multicast_toggle(struct net_bridge *br, unsigned long val) |
1729 | { | 1729 | { |
1730 | struct net_bridge_port *port; | 1730 | struct net_bridge_port *port; |
1731 | int err = -ENOENT; | 1731 | int err = 0; |
1732 | 1732 | ||
1733 | spin_lock(&br->multicast_lock); | 1733 | spin_lock(&br->multicast_lock); |
1734 | if (!netif_running(br->dev)) | ||
1735 | goto unlock; | ||
1736 | |||
1737 | err = 0; | ||
1738 | if (br->multicast_disabled == !val) | 1734 | if (br->multicast_disabled == !val) |
1739 | goto unlock; | 1735 | goto unlock; |
1740 | 1736 | ||
@@ -1742,6 +1738,9 @@ int br_multicast_toggle(struct net_bridge *br, unsigned long val) | |||
1742 | if (br->multicast_disabled) | 1738 | if (br->multicast_disabled) |
1743 | goto unlock; | 1739 | goto unlock; |
1744 | 1740 | ||
1741 | if (!netif_running(br->dev)) | ||
1742 | goto unlock; | ||
1743 | |||
1745 | if (br->mdb) { | 1744 | if (br->mdb) { |
1746 | if (br->mdb->old) { | 1745 | if (br->mdb->old) { |
1747 | err = -EEXIST; | 1746 | err = -EEXIST; |