From patchwork Wed Dec 1 19:15:10 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Strand X-Patchwork-Id: 73878 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 4BC43B6F14 for ; Thu, 2 Dec 2010 06:15:40 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756201Ab0LATPM (ORCPT ); Wed, 1 Dec 2010 14:15:12 -0500 Received: from mail-ey0-f174.google.com ([209.85.215.174]:51787 "EHLO mail-ey0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753899Ab0LATPL (ORCPT ); Wed, 1 Dec 2010 14:15:11 -0500 Received: by eye27 with SMTP id 27so3749478eye.19 for ; Wed, 01 Dec 2010 11:15:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:cc:content-type; bh=/U3dxKUM2jEqssGwZdVyoGb0mHfz63iUi/Swu5jetvk=; b=Sp1rOPAV2YphjT9s0wM76KFiPxMv62vcq+3nzLypsWuL1tfhT/tuV0hg2ebeEIRHOs 5GqAO/9FlsYHveNbw4GG+pdVOywfxBHTI4kTLTUl6/BrZcvEfTK4iwQP0tIJVzjBa5Pc rgq3zscNDximutoerqvCtg//A0aYn2epmaio8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:cc:content-type; b=bYI0aM8u7RPBCogRvqe1rvSqHc5oiXdsVu1N+yzRa0oNvwm1X8NrUX7Dhdem2ttmXQ qoXthznTRcA8zOILwyYHjuuU9W4hcGOvQwxVputiF5pKE8V21W3/gT5aaC9V9CIs0QLo vV1G9lNhRKuOdYK7+IgsW4iemYb0hxHzryU60= MIME-Version: 1.0 Received: by 10.14.119.144 with SMTP id n16mr329761eeh.44.1291230910187; Wed, 01 Dec 2010 11:15:10 -0800 (PST) Received: by 10.14.119.11 with HTTP; Wed, 1 Dec 2010 11:15:10 -0800 (PST) Date: Wed, 1 Dec 2010 11:15:10 -0800 Message-ID: Subject: [PATCH] bonding: check for assigned mac before adopting the slaves mac address From: David Strand To: netdev@vger.kernel.org Cc: Jay Vosburgh , linux-kernel@vger.kernel.org Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Restore the check for an unassigned mac address before adopting the first slaves as it's own. The change in behavior was introduced with the following patch: http://git.kernel.org/?p=linux/kernel/git/stable/linux-2.6.36.y.git;a=commit;h=c20811a79e671a6a1fe86a8c1afe04aca8a7f085 Signed-off-by: David Strand --- the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff -uprN a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c --- a/drivers/net/bonding/bond_main.c 2010-11-24 11:36:58.125640000 -0800 +++ b/drivers/net/bonding/bond_main.c 2010-12-01 10:12:33.728640001 -0800 @@ -1576,7 +1576,7 @@ int bond_enslave(struct net_device *bond /* If this is the first slave, then we need to set the master's hardware * address to be the same as the slave's. */ - if (bond->slave_cnt == 0) + if (is_zero_ether_addr(bond->dev->dev_addr)) memcpy(bond->dev->dev_addr, slave_dev->dev_addr, slave_dev->addr_len); -- To unsubscribe from this list: send the line "unsubscribe netdev" in