From patchwork Wed Dec 1 19:21:08 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jay Vosburgh X-Patchwork-Id: 73880 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 0F7DCB6F14 for ; Thu, 2 Dec 2010 06:22:25 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755617Ab0LATVy (ORCPT ); Wed, 1 Dec 2010 14:21:54 -0500 Received: from e1.ny.us.ibm.com ([32.97.182.141]:51977 "EHLO e1.ny.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751829Ab0LATVx (ORCPT ); Wed, 1 Dec 2010 14:21:53 -0500 Received: from d01dlp01.pok.ibm.com (d01dlp01.pok.ibm.com [9.56.224.56]) by e1.ny.us.ibm.com (8.14.4/8.13.1) with ESMTP id oB1JCiDV019651; Wed, 1 Dec 2010 14:13:51 -0500 Received: from d01relay04.pok.ibm.com (d01relay04.pok.ibm.com [9.56.227.236]) by d01dlp01.pok.ibm.com (Postfix) with ESMTP id B34717280F1; Wed, 1 Dec 2010 14:21:12 -0500 (EST) Received: from d03av04.boulder.ibm.com (d03av04.boulder.ibm.com [9.17.195.170]) by d01relay04.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id oB1JLCpo169954; Wed, 1 Dec 2010 14:21:12 -0500 Received: from d03av04.boulder.ibm.com (loopback [127.0.0.1]) by d03av04.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id oB1JLB9k013718; Wed, 1 Dec 2010 12:21:11 -0700 Received: from death (sig-9-65-239-188.mts.ibm.com [9.65.239.188]) by d03av04.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id oB1JL9N3013213 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 1 Dec 2010 12:21:11 -0700 Received: from localhost ([127.0.0.1] helo=death) by death with esmtp (Exim 4.71) (envelope-from ) id 1PNsEm-00071X-LJ; Wed, 01 Dec 2010 11:21:08 -0800 From: Jay Vosburgh To: David Strand cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, "David S. Miller" Subject: Re: [PATCH] bonding: check for assigned mac before adopting the slaves mac address In-reply-to: References: Comments: In-reply-to David Strand message dated "Wed, 01 Dec 2010 11:15:10 -0800." X-Mailer: MH-E 8.2; nmh 1.3; GNU Emacs 23.2.1 Date: Wed, 01 Dec 2010 11:21:08 -0800 Message-ID: <27001.1291231268@death> X-Content-Scanned: Fidelis XPS MAILER Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: David Strand Restore the check for an unassigned mac address before adopting the first slaves as it's own. The change in behavior was introduced by: commit c20811a79e671a6a1fe86a8c1afe04aca8a7f085 Author: Jiri Pirko bonding: move dev_addr cpy to bond_enslave Signed-off-by: David Strand Signed-off-by: Jay Vosburgh --- 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