Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

net: hsr: emit notification for PRP slave2 changed hw addr on port deletion

On PRP protocol, when deleting the port the MAC address change
notification was missing. In addition to that, make sure to only perform
the MAC address change on slave2 deletion and PRP protocol as the
operation isn't necessary for HSR nor slave1.

Note that the eth_hw_addr_set() is correct on PRP context as the slaves
are either in promiscuous mode or forward offload enabled.

Reported-by: Luka Gejak <luka.gejak@linux.dev>
Closes: https://lore.kernel.org/netdev/DHFCZEM93FTT.1RWFBIE32K7OT@linux.dev/
Signed-off-by: Fernando Fernandez Mancera <fmancera@suse.de>
Reviewed-by: Felix Maurer <fmaurer@redhat.com>
Link: https://patch.msgid.link/20260403123928.4249-2-fmancera@suse.de
Signed-off-by: Paolo Abeni <pabeni@redhat.com>

authored by

Fernando Fernandez Mancera and committed by
Paolo Abeni
2ce8a411 97a8355b

+5 -1
+5 -1
net/hsr/hsr_slave.c
··· 243 243 if (!port->hsr->fwd_offloaded) 244 244 dev_set_promiscuity(port->dev, -1); 245 245 netdev_upper_dev_unlink(port->dev, master->dev); 246 - eth_hw_addr_set(port->dev, port->original_macaddress); 246 + if (hsr->prot_version == PRP_V1 && 247 + port->type == HSR_PT_SLAVE_B) { 248 + eth_hw_addr_set(port->dev, port->original_macaddress); 249 + call_netdevice_notifiers(NETDEV_CHANGEADDR, port->dev); 250 + } 247 251 } 248 252 249 253 kfree_rcu(port, rcu);