diff mbox

[net-next-2.6] infiniband: convert to use netdev_for_each_mc_addr

Message ID 20100225084915.GA3171@psychotron.redhat.com (mailing list archive)
State Accepted, archived
Headers show

Commit Message

Jiri Pirko Feb. 25, 2010, 8:49 a.m. UTC
None
diff mbox

Patch

diff --git a/net/core/dev_mcast.c b/net/core/dev_mcast.c
index 9e2fa39..fd91569 100644
--- a/net/core/dev_mcast.c
+++ b/net/core/dev_mcast.c
@@ -96,6 +96,8 @@  int dev_mc_add(struct net_device *dev, void *addr, int alen, int glbl)
 	int err;
 
 	netif_addr_lock_bh(dev);
+	if (alen != dev->addr_len)
+		return -EINVAL;
 	err = __dev_addr_add(&dev->mc_list, &dev->mc_count, addr, alen, glbl);
 	if (!err)
 		__dev_set_rx_mode(dev);