SIGN IN SIGN UP

hsr: copy mac address from port1 to port2 and hsr interfaces

Currently, when a PRP interface is configured, the MAC address
is not shared among ports, and the interface loses failover ability.

Make it so that the MAC address is shared among the PRP interface
and its ports. The MAC address is chosen in order of preference:
- mac-address / copy-mac-from set on hsr interface
- mac-address / copy-mac-from set on port1 interface
- permanent-mac-address of port1 interface

This issue is already handled similarly in kernel:
https://lore.kernel.org/netdev/20250409101911.3120-1-ffmancera@riseup.net/

This fix is a (re)implementation of this logic to maintain support
for older distributions.

Signed-off-by: Jan Vaclav <jvaclav@redhat.com>
J
Jan Vaclav committed
43d5ecac607ce9ca5d84c97ca7b3100844973455
Parent: 1754abd
Committed by Gris Ge <fge@redhat.com> on 9/12/2025, 7:04:07 AM