aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/mcast.c
diff options
context:
space:
mode:
authorMoni Shoua <monis@voltaire.com>2009-09-15 05:37:40 -0400
committerDavid S. Miller <davem@davemloft.net>2009-09-15 05:37:40 -0400
commit75c78500ddad74b229cd0691496b8549490496a2 (patch)
tree5249219d68627421e4717c4e8f03f8b4bbad2e92 /net/ipv6/mcast.c
parent481a8199142c050b72bff8a1956a49fd0a75bbe0 (diff)
bonding: remap muticast addresses without using dev_close() and dev_open()
This patch fixes commit e36b9d16c6a6d0f59803b3ef04ff3c22c3844c10. The approach there is to call dev_close()/dev_open() whenever the device type is changed in order to remap the device IP multicast addresses to HW multicast addresses. This approach suffers from 2 drawbacks: *. It assumes tha the device is UP when calling dev_close(), or otherwise dev_close() has no affect. It is worth to mention that initscripts (Redhat) and sysconfig (Suse) doesn't act the same in this matter. *. dev_close() has other side affects, like deleting entries from the routing table, which might be unnecessary. The fix here is to directly remap the IP multicast addresses to HW multicast addresses for a bonding device that changes its type, and nothing else. Reported-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com> Signed-off-by: Moni Shoua <monis@voltaire.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/mcast.c')
-rw-r--r--net/ipv6/mcast.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/net/ipv6/mcast.c b/net/ipv6/mcast.c
index 71c3dacec1ed..f9fcf690bd5d 100644
--- a/net/ipv6/mcast.c
+++ b/net/ipv6/mcast.c
@@ -2249,6 +2249,25 @@ static void igmp6_timer_handler(unsigned long data)
2249 ma_put(ma); 2249 ma_put(ma);
2250} 2250}
2251 2251
2252/* Device changing type */
2253
2254void ipv6_mc_unmap(struct inet6_dev *idev)
2255{
2256 struct ifmcaddr6 *i;
2257
2258 /* Install multicast list, except for all-nodes (already installed) */
2259
2260 read_lock_bh(&idev->lock);
2261 for (i = idev->mc_list; i; i = i->next)
2262 igmp6_group_dropped(i);
2263 read_unlock_bh(&idev->lock);
2264}
2265
2266void ipv6_mc_remap(struct inet6_dev *idev)
2267{
2268 ipv6_mc_up(idev);
2269}
2270
2252/* Device going down */ 2271/* Device going down */
2253 2272
2254void ipv6_mc_down(struct inet6_dev *idev) 2273void ipv6_mc_down(struct inet6_dev *idev)