From: Hangbin Liu <liuhangbin@gmail.com>
To: Jakub Kicinski <kuba@kernel.org>, Jay Vosburgh <jv@jvosburgh.net>
Cc: netdev@vger.kernel.org, Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>,
Nikolay Aleksandrov <razor@blackwall.org>,
Simon Horman <horms@kernel.org>, Cosmin Ratiu <cratiu@nvidia.com>,
linux-kernel@vger.kernel.org, Liang Li <liali@redhat.com>
Subject: Re: [PATCH net] bonding: use permanent address for MAC swapping if device address is same
Date: Wed, 26 Mar 2025 14:18:06 +0000 [thread overview]
Message-ID: <Z-QMniz1QK2oqZJQ@fedora> (raw)
In-Reply-To: <20250326043213.5fce3b81@kernel.org>
On Wed, Mar 26, 2025 at 04:32:13AM -0700, Jakub Kicinski wrote:
> On Wed, 26 Mar 2025 10:22:58 +0000 Hangbin Liu wrote:
> > > I don't know much about bonding, but this seems like a problem already
> > > to me. Assuming both eth0 and eth1 are on the same segment we now have
> > > two interfaces with the same MAC on the network. Shouldn't we override
> > > the address of eth0 to a random one when it leaves?
> >
> > Can we change an interface mac to random value after leaving bond's control?
> > It looks may break user's other configures.
>
> Hard to speculate but leaving two interfaces with the same MAC is even
> worse? I guess nobody hit this problem in practice.
It's the default behavior for bonding as bond will take the first link's
MAC address. If release the first link, then we will have 2 interfaces (bond
and first link) has same MAC address.
Usually, People doesn't release the link after adding to bond, but it do happens.
Hi Jay, any comments?
Thanks
Hangbin
next prev parent reply other threads:[~2025-03-26 14:18 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-19 8:09 [PATCH net] bonding: use permanent address for MAC swapping if device address is same Hangbin Liu
2025-03-20 19:13 ` Jay Vosburgh
2025-03-24 2:30 ` Hangbin Liu
2025-03-25 13:24 ` Jakub Kicinski
2025-03-26 10:22 ` Hangbin Liu
2025-03-26 11:32 ` Jakub Kicinski
2025-03-26 14:18 ` Hangbin Liu [this message]
2025-04-03 14:02 ` Paolo Abeni
2025-04-07 7:57 ` Hangbin Liu
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=Z-QMniz1QK2oqZJQ@fedora \
--to=liuhangbin@gmail.com \
--cc=andrew+netdev@lunn.ch \
--cc=cratiu@nvidia.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=jv@jvosburgh.net \
--cc=kuba@kernel.org \
--cc=liali@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=razor@blackwall.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).