aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bonding
diff options
context:
space:
mode:
authorMoni Shoua <monis@voltaire.com>2007-10-09 22:43:40 -0400
committerJeff Garzik <jeff@garzik.org>2007-10-15 14:20:46 -0400
commit6b1bf096508c870889c2be63c7757a04d72116fe (patch)
tree5c65fe47e72b8b1a4f20a6c8541a23d8a94c0f46 /drivers/net/bonding
parent2ab82852a2706b47c257ac87675ab8b06bc214dd (diff)
net/bonding: Enable IP multicast for bonding IPoIB devices
Allow to enslave devices when the bonding device is not up. Over the discussion held at the previous post this seemed to be the most clean way to go, where it is not expected to cause instabilities. Normally, the bonding driver is UP before any enslavement takes place. Once a netdevice is UP, the network stack acts to have it join some multicast groups (eg the all-hosts 224.0.0.1). Now, since ether_setup() have set the bonding device type to be ARPHRD_ETHER and address len to be ETHER_ALEN, the net core code computes a wrong multicast link address. This is b/c ip_eth_mc_map() is called where for multicast joins taking place after the enslavement another ip_xxx_mc_map() is called (eg ip_ib_mc_map() when the bond type is ARPHRD_INFINIBAND) Signed-off-by: Moni Shoua <monis at voltaire.com> Signed-off-by: Or Gerlitz <ogerlitz at voltaire.com> Acked-by: Jay Vosburgh <fubar@us.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/bonding')
-rw-r--r--drivers/net/bonding/bond_main.c5
-rw-r--r--drivers/net/bonding/bond_sysfs.c6
2 files changed, 5 insertions, 6 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 6508e0b2ea72..3eebfe287533 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -1280,8 +1280,9 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev)
1280 1280
1281 /* bond must be initialized by bond_open() before enslaving */ 1281 /* bond must be initialized by bond_open() before enslaving */
1282 if (!(bond_dev->flags & IFF_UP)) { 1282 if (!(bond_dev->flags & IFF_UP)) {
1283 dprintk("Error, master_dev is not up\n"); 1283 printk(KERN_WARNING DRV_NAME
1284 return -EPERM; 1284 " %s: master_dev is not up in bond_enslave\n",
1285 bond_dev->name);
1285 } 1286 }
1286 1287
1287 /* already enslaved */ 1288 /* already enslaved */
diff --git a/drivers/net/bonding/bond_sysfs.c b/drivers/net/bonding/bond_sysfs.c
index 6f49ca7e9b66..ca4e429f9ec2 100644
--- a/drivers/net/bonding/bond_sysfs.c
+++ b/drivers/net/bonding/bond_sysfs.c
@@ -266,11 +266,9 @@ static ssize_t bonding_store_slaves(struct device *d,
266 266
267 /* Quick sanity check -- is the bond interface up? */ 267 /* Quick sanity check -- is the bond interface up? */
268 if (!(bond->dev->flags & IFF_UP)) { 268 if (!(bond->dev->flags & IFF_UP)) {
269 printk(KERN_ERR DRV_NAME 269 printk(KERN_WARNING DRV_NAME
270 ": %s: Unable to update slaves because interface is down.\n", 270 ": %s: doing slave updates when interface is down.\n",
271 bond->dev->name); 271 bond->dev->name);
272 ret = -EPERM;
273 goto out;
274 } 272 }
275 273
276 /* Note: We can't hold bond->lock here, as bond_create grabs it. */ 274 /* Note: We can't hold bond->lock here, as bond_create grabs it. */