tree b8b46e695f3b0685e1962f88a4115d8b69de8fb3
parent 00db8189d984d6c51226dafbbe4a667ce9b7d5da
author John W. Linville <[EMAIL PROTECTED]> Thu, 28 Jul 2005 23:00:15 -0400
committer Jeff Garzik <[EMAIL PROTECTED]> Sun, 31 Jul 2005 08:37:29 -0400

[PATCH] bonding: ALB -- allow slave to use bond's MAC address if its 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 <[EMAIL PROTECTED]>
Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]>

 drivers/net/bonding/bond_alb.c |   17 ++++++-----------
 1 files changed, 6 insertions(+), 11 deletions(-)

diff --git a/drivers/net/bonding/bond_alb.c b/drivers/net/bonding/bond_alb.c
--- a/drivers/net/bonding/bond_alb.c
+++ b/drivers/net/bonding/bond_alb.c
@@ -1106,18 +1106,13 @@ static int alb_handle_addr_collision_on_
                        }
                }
 
-               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.
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to