Commit 29a5fd48 authored by Hangbin Liu's avatar Hangbin Liu Committed by Greg Kroah-Hartman
Browse files

bonding: set random address only when slaves already exist



[ Upstream commit 35ae4e86 ]

After commit 5c3bf6cb ("bonding: assign random address if device
address is same as bond"), bonding will erroneously randomize the MAC
address of the first interface added to the bond if fail_over_mac =
follow.

Correct this by additionally testing for the bond being empty before
randomizing the MAC.

Fixes: 5c3bf6cb ("bonding: assign random address if device address is same as bond")
Reported-by: default avatarQiuling Ren <qren@redhat.com>
Signed-off-by: default avatarHangbin Liu <liuhangbin@gmail.com>
Link: https://patch.msgid.link/20250910024336.400253-1-liuhangbin@gmail.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent ea53e6a4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment