netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jay Vosburgh <fubar@us.ibm.com>
To: netdev@vger.kernel.org
Cc: David Miller <davem@davemloft.net>
Subject: [PATCH v2 net 6/6] bonding: disallow change of MAC if fail_over_mac enabled
Date: Fri, 31 May 2013 14:57:31 -0700	[thread overview]
Message-ID: <1370037451-29466-7-git-send-email-fubar@us.ibm.com> (raw)
In-Reply-To: <1370037451-29466-1-git-send-email-fubar@us.ibm.com>

	Currently, if fail_over_mac is set to active, then attempts to
change the MAC of the bond itself silently fail.  However, if fail_over_mac
is set to follow, changes are permitted.

	Permitting the bond's MAC to change with fail_over_mac=follow
will disrupt the follow functionality, which normally controls the
assignment of MAC address to the bond and its slaves, and can cause
multiple ports to be assigned the same MAC address. which will interfere
with the functioning of the device (where the device here is a
virtualization-aware card for s390, qeth).

Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
---
 drivers/net/bonding/bond_main.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 4953f66..bc1246f 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -3780,11 +3780,10 @@ static int bond_set_mac_address(struct net_device *bond_dev, void *addr)
 	pr_debug("bond=%p, name=%s\n",
 		 bond, bond_dev ? bond_dev->name : "None");
 
-	/*
-	 * If fail_over_mac is set to active, do nothing and return
-	 * success.  Returning an error causes ifenslave to fail.
+	/* If fail_over_mac is enabled, do nothing and return success.
+	 * Returning an error causes ifenslave to fail.
 	 */
-	if (bond->params.fail_over_mac == BOND_FOM_ACTIVE)
+	if (bond->params.fail_over_mac)
 		return 0;
 
 	if (!is_valid_ether_addr(sa->sa_data))
-- 
1.7.1

  parent reply	other threads:[~2013-05-31 21:57 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-31 21:57 [PATCH v2 net 0/6] net/core, bonding: dev_uc_sync fixes, bonding update Jay Vosburgh
2013-05-31 21:57 ` [PATCH v2 net 1/6] net/core: __hw_addr_create_ex does not initialize sync_cnt Jay Vosburgh
2013-05-31 21:57 ` [PATCH v2 net 2/6] net/core: __hw_addr_unsync_one "from" address not marked synced Jay Vosburgh
2013-05-31 21:57 ` [PATCH v2 net 3/6] net/core: __hw_addr_sync_one / _multiple broken Jay Vosburgh
2013-05-31 21:57 ` [PATCH v2 net 4/6] net/core: dev_mc_sync_multiple calls wrong helper Jay Vosburgh
2013-05-31 21:57 ` [PATCH v2 net 5/6] bonding: Convert hw addr handling to sync/unsync, support ucast addresses Jay Vosburgh
2013-06-07 22:06   ` David Miller
2013-05-31 21:57 ` Jay Vosburgh [this message]
2013-06-07 22:06   ` [PATCH v2 net 6/6] bonding: disallow change of MAC if fail_over_mac enabled David Miller
2013-05-31 23:58 ` [PATCH v2 net 0/6] net/core, bonding: dev_uc_sync fixes, bonding update David Miller
2013-06-01 17:00 ` Or Gerlitz
2013-06-01 19:04   ` Shawn Bohrer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1370037451-29466-7-git-send-email-fubar@us.ibm.com \
    --to=fubar@us.ibm.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).