diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-13 17:50:18 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-13 17:50:18 -0500 |
commit | d89b218b801fd93ea95880f1c7fde348cbcc51c5 (patch) | |
tree | cd3c34e1811f9b2bc10ecfb957bf26cbd04c677e /net/bridge | |
parent | 80a186074e72e2cd61f6716d90cf32ce54981a56 (diff) | |
parent | bec68ff1637ca00bb1585a03a7be8a13380084de (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (108 commits)
bridge: ensure to unlock in error path in br_multicast_query().
drivers/net/tulip/eeprom.c: fix bogus "(null)" in tulip init messages
sky2: Avoid rtnl_unlock without rtnl_lock
ipv6: Send netlink notification when DAD fails
drivers/net/tg3.c: change the field used with the TG3_FLAG_10_100_ONLY constant
ipconfig: Handle devices which take some time to come up.
mac80211: Fix memory leak in ieee80211_if_write()
mac80211: Fix (dynamic) power save entry
ipw2200: use kmalloc for large local variables
ath5k: read eeprom IQ calibration values correctly for G mode
ath5k: fix I/Q calibration (for real)
ath5k: fix TSF reset
ath5k: use fixed antenna for tx descriptors
libipw: split ieee->networks into small pieces
mac80211: Fix sta_mtx unlocking on insert STA failure path
rt2x00: remove KSEG1ADDR define from rt2x00soc.h
net: add ColdFire support to the smc91x driver
asix: fix setting mac address for AX88772
ipv6 ip6_tunnel: eliminate unused recursion field from ip6_tnl{}.
net: Fix dev_mc_add()
...
Diffstat (limited to 'net/bridge')
-rw-r--r-- | net/bridge/Kconfig | 1 | ||||
-rw-r--r-- | net/bridge/br_multicast.c | 19 |
2 files changed, 12 insertions, 8 deletions
diff --git a/net/bridge/Kconfig b/net/bridge/Kconfig index 19a6b9629c51..d115d5cea5b6 100644 --- a/net/bridge/Kconfig +++ b/net/bridge/Kconfig | |||
@@ -35,6 +35,7 @@ config BRIDGE | |||
35 | config BRIDGE_IGMP_SNOOPING | 35 | config BRIDGE_IGMP_SNOOPING |
36 | bool "IGMP snooping" | 36 | bool "IGMP snooping" |
37 | depends on BRIDGE | 37 | depends on BRIDGE |
38 | depends on INET | ||
38 | default y | 39 | default y |
39 | ---help--- | 40 | ---help--- |
40 | If you say Y here, then the Ethernet bridge will be able selectively | 41 | If you say Y here, then the Ethernet bridge will be able selectively |
diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c index 2559fb539836..fd96a8dc97f4 100644 --- a/net/bridge/br_multicast.c +++ b/net/bridge/br_multicast.c | |||
@@ -38,7 +38,7 @@ static struct net_bridge_mdb_entry *__br_mdb_ip_get( | |||
38 | struct net_bridge_mdb_entry *mp; | 38 | struct net_bridge_mdb_entry *mp; |
39 | struct hlist_node *p; | 39 | struct hlist_node *p; |
40 | 40 | ||
41 | hlist_for_each_entry(mp, p, &mdb->mhash[hash], hlist[mdb->ver]) { | 41 | hlist_for_each_entry_rcu(mp, p, &mdb->mhash[hash], hlist[mdb->ver]) { |
42 | if (dst == mp->addr) | 42 | if (dst == mp->addr) |
43 | return mp; | 43 | return mp; |
44 | } | 44 | } |
@@ -627,8 +627,8 @@ static void br_multicast_port_query_expired(unsigned long data) | |||
627 | struct net_bridge *br = port->br; | 627 | struct net_bridge *br = port->br; |
628 | 628 | ||
629 | spin_lock(&br->multicast_lock); | 629 | spin_lock(&br->multicast_lock); |
630 | if (port && (port->state == BR_STATE_DISABLED || | 630 | if (port->state == BR_STATE_DISABLED || |
631 | port->state == BR_STATE_BLOCKING)) | 631 | port->state == BR_STATE_BLOCKING) |
632 | goto out; | 632 | goto out; |
633 | 633 | ||
634 | if (port->multicast_startup_queries_sent < | 634 | if (port->multicast_startup_queries_sent < |
@@ -823,6 +823,7 @@ static int br_multicast_query(struct net_bridge *br, | |||
823 | unsigned long max_delay; | 823 | unsigned long max_delay; |
824 | unsigned long now = jiffies; | 824 | unsigned long now = jiffies; |
825 | __be32 group; | 825 | __be32 group; |
826 | int err = 0; | ||
826 | 827 | ||
827 | spin_lock(&br->multicast_lock); | 828 | spin_lock(&br->multicast_lock); |
828 | if (!netif_running(br->dev) || | 829 | if (!netif_running(br->dev) || |
@@ -841,12 +842,14 @@ static int br_multicast_query(struct net_bridge *br, | |||
841 | group = 0; | 842 | group = 0; |
842 | } | 843 | } |
843 | } else { | 844 | } else { |
844 | if (!pskb_may_pull(skb, sizeof(struct igmpv3_query))) | 845 | if (!pskb_may_pull(skb, sizeof(struct igmpv3_query))) { |
845 | return -EINVAL; | 846 | err = -EINVAL; |
847 | goto out; | ||
848 | } | ||
846 | 849 | ||
847 | ih3 = igmpv3_query_hdr(skb); | 850 | ih3 = igmpv3_query_hdr(skb); |
848 | if (ih3->nsrcs) | 851 | if (ih3->nsrcs) |
849 | return 0; | 852 | goto out; |
850 | 853 | ||
851 | max_delay = ih3->code ? 1 : | 854 | max_delay = ih3->code ? 1 : |
852 | IGMPV3_MRC(ih3->code) * (HZ / IGMP_TIMER_SCALE); | 855 | IGMPV3_MRC(ih3->code) * (HZ / IGMP_TIMER_SCALE); |
@@ -876,7 +879,7 @@ static int br_multicast_query(struct net_bridge *br, | |||
876 | 879 | ||
877 | out: | 880 | out: |
878 | spin_unlock(&br->multicast_lock); | 881 | spin_unlock(&br->multicast_lock); |
879 | return 0; | 882 | return err; |
880 | } | 883 | } |
881 | 884 | ||
882 | static void br_multicast_leave_group(struct net_bridge *br, | 885 | static void br_multicast_leave_group(struct net_bridge *br, |
@@ -1135,7 +1138,7 @@ void br_multicast_stop(struct net_bridge *br) | |||
1135 | 1138 | ||
1136 | if (mdb->old) { | 1139 | if (mdb->old) { |
1137 | spin_unlock_bh(&br->multicast_lock); | 1140 | spin_unlock_bh(&br->multicast_lock); |
1138 | synchronize_rcu_bh(); | 1141 | rcu_barrier_bh(); |
1139 | spin_lock_bh(&br->multicast_lock); | 1142 | spin_lock_bh(&br->multicast_lock); |
1140 | WARN_ON(mdb->old); | 1143 | WARN_ON(mdb->old); |
1141 | } | 1144 | } |