Commit 6b1bf096 authored by Moni Shoua's avatar Moni Shoua Committed by Jeff Garzik
Browse files

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 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>
Signed-off-by: Or Gerlitz <ogerlitz at>
Acked-by: default avatarJay Vosburgh <>
Signed-off-by: default avatarJeff Garzik <>
parent 2ab82852
......@@ -1280,8 +1280,9 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev)
/* bond must be initialized by bond_open() before enslaving */
if (!(bond_dev->flags & IFF_UP)) {
dprintk("Error, master_dev is not up\n");
return -EPERM;
" %s: master_dev is not up in bond_enslave\n",
/* already enslaved */
......@@ -266,11 +266,9 @@ static ssize_t bonding_store_slaves(struct device *d,
/* Quick sanity check -- is the bond interface up? */
if (!(bond->dev->flags & IFF_UP)) {
": %s: Unable to update slaves because interface is down.\n",
": %s: doing slave updates when interface is down.\n",
ret = -EPERM;
goto out;
/* Note: We can't hold bond->lock here, as bond_create grabs it. */
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment