Skip to content

Commit

Permalink
[PATCH] bonding: ALB -- allow slave to use bond's MAC address if its …
Browse files Browse the repository at this point in the history
…own MAC address conflicts

In ALB mode, allow new slave to use bond's MAC address if the new
slave's MAC address is being used within the bond and no other slave
is using the bond's MAC address.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
  • Loading branch information
John W. Linville authored and Jeff Garzik committed Jul 31, 2005
1 parent 00db818 commit 6b38aef
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions drivers/net/bonding/bond_alb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1106,18 +1106,13 @@ static int alb_handle_addr_collision_on_attach(struct bonding *bond, struct slav
}
}

if (found) {
/* a slave was found that is using the mac address
* of the new slave
*/
printk(KERN_ERR DRV_NAME
": Error: the hw address of slave %s is not "
"unique - cannot enslave it!",
slave->dev->name);
return -EINVAL;
}
if (!found)
return 0;

return 0;
/* Try setting slave mac to bond address and fall-through
to code handling that situation below... */
alb_set_slave_mac_addr(slave, bond->dev->dev_addr,
bond->alb_info.rlb_enabled);
}

/* The slave's address is equal to the address of the bond.
Expand Down

0 comments on commit 6b38aef

Please sign in to comment.