All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jörn Engel" <joern@purestorage.com>
To: dingtianhong <dingtianhong@huawei.com>,
	Jay Vosburgh <fubar@us.ibm.com>,
	"David S. Miller" <davem@davemloft.net>
Cc: Andy Gospodarek <andy@greyhouse.net>, netdev@vger.kernel.org
Subject: [PATCH] bonding: Allow tun-interfaces as slaves
Date: Mon, 8 Aug 2016 14:48:12 -0700	[thread overview]
Message-ID: <20160808214812.GJ22974@cork> (raw)
In-Reply-To: <20160808212112.GI22974@cork>

Up until 00503b6f702e (part of 3.14-rc1), the bonding driver could be
used to enslave tun-interfaces.  00503b6f702e broke that behaviour,
afaics as an unintended side-effect.

For the purpose of bond-over-tun in balance-rr mode, simply ignoring the
error from dev_set_mac_address() is good enough.  I am not familiar
enough with the code to judge what new problems this patch might
introduce.

Signed-off-by: Joern Engel <joern@purestorage.com>
---
 drivers/net/bonding/bond_main.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 1f276fa30ba6..bc5dba847f50 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -1489,11 +1489,7 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev)
 		 */
 		memcpy(addr.sa_data, bond_dev->dev_addr, bond_dev->addr_len);
 		addr.sa_family = slave_dev->type;
-		res = dev_set_mac_address(slave_dev, &addr);
-		if (res) {
-			netdev_dbg(bond_dev, "Error %d calling set_mac_address\n", res);
-			goto err_restore_mtu;
-		}
+		dev_set_mac_address(slave_dev, &addr);
 	}
 
 	/* set slave flag before open to prevent IPv6 addrconf */
@@ -1777,7 +1773,6 @@ err_restore_mac:
 		dev_set_mac_address(slave_dev, &addr);
 	}
 
-err_restore_mtu:
 	dev_set_mtu(slave_dev, new_slave->original_mtu);
 
 err_free:
-- 
2.1.4

  reply	other threads:[~2016-08-08 21:48 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-08 21:15 [Regression] Bonding no longer support tun-interfaces Jörn Engel
2016-08-08 21:15 ` Jörn Engel
2016-08-08 21:17 ` David Miller
2016-08-08 21:21 ` Jörn Engel
2016-08-08 21:48   ` Jörn Engel [this message]
2016-08-09  2:18     ` [PATCH] bonding: Allow tun-interfaces as slaves Ding Tianhong
2016-08-09  3:09       ` Jörn Engel
2016-08-09  5:29         ` zhuyj
2016-08-09 13:28           ` Ding Tianhong
2016-08-09 18:08             ` Jörn Engel
2016-08-09 19:06               ` David Miller
2016-08-09 21:10                 ` Jörn Engel
2016-08-09 23:51                   ` Jay Vosburgh
2016-08-10  1:06                     ` Ding Tianhong
2016-08-10  9:27                     ` Ding Tianhong
2016-08-10 17:41                       ` Jay Vosburgh
2016-08-11  1:20                         ` Ding Tianhong
2016-08-10 21:26                     ` Jörn Engel
2016-08-10 22:00                       ` Jörn Engel
2016-08-11  0:58                         ` Jay Vosburgh
2016-08-11  1:37                           ` Ding Tianhong
2016-08-11 18:24                           ` Jörn Engel
2016-08-29 22:49                             ` Jörn Engel
2016-08-30  1:44                             ` Ding Tianhong
2016-08-09  5:52         ` Ding Tianhong
2016-08-09 18:21         ` Jay Vosburgh
2016-08-09 18:40           ` Jörn Engel
2016-08-09 19:10             ` David Miller

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=20160808214812.GJ22974@cork \
    --to=joern@purestorage.com \
    --cc=andy@greyhouse.net \
    --cc=davem@davemloft.net \
    --cc=dingtianhong@huawei.com \
    --cc=fubar@us.ibm.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.