Re: [PATCH net-next] bonding: roll back fail_over_mac if enslave fails
From: willemb
Date: Fri Dec 04 2026 - 00:03:10 EST
Hangbin Liu wrote:
Hi Willem,
On Wed, Dec 02, 2026 at 09:02:01PM -0500, willemb@xxxxxxxxxx wrote:
> Hangbin Liu wrote:
> > From: Hangbin Liu <liuhangbin@xxxxxxxxxx>
>
> > bond_enslave() can change bond->params.fail_over_mac as a side
> > effect: when the first slave cannot set its own MAC address and the
> > bond is in active-backup mode, fail_over_mac is forced to "active" so
> > bonding never writes the slave MAC. If enslave fails later, the
> > forced value stays behind, silently changing a user-configured
> > option after a failed operation and affecting subsequent failover
> > behaviour.
>
> > Snapshot fail_over_mac on entry and restore it on the error path.
>
> > Signed-off-by: Hangbin Liu <liuhangbin@xxxxxxxxxx>
>
> When respinning, please fold the discovery context and the WireGuard +
> XDP
> reproducer from your reply to Paolo into the commit message (per sinfo),
> and consider adding:
>
> Fixes: 3915c1e8634a ("bonding: Add "follow" option to fail_over_mac")
>
> Also if targeting net-next.
Sometimes I'm a little confused whether the small/corner fix should be target
to net or next. Usually we post all fix to net. But last time I was told
to post none critical, small fix to net-next.
Understood. It's a bit of a gray area. That is the guidance. So the
current target is good.
I only meant to add that even when redirecting a less critical fix to
net-next, it's still fine to document the Fixes.