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: hsr_slave: Fix the promiscuous mode in offload mode

commit e748d0fd66ab ("net: hsr: Disable promiscuous mode in
offload mode") disables promiscuous mode of slave devices
while creating an HSR interface. But while deleting the
HSR interface, it does not take care of it. It decreases the
promiscuous mode count, which eventually enables promiscuous
mode on the slave devices when creating HSR interface again.

Fix this by not decrementing the promiscuous mode count while
deleting the HSR interface when offload is enabled.

Fixes: e748d0fd66ab ("net: hsr: Disable promiscuous mode in offload mode")
Signed-off-by: Ravi Gunasekaran <r-gunasekaran@ti.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Link: https://lore.kernel.org/r/20240322100447.27615-1-r-gunasekaran@ti.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Ravi Gunasekaran and committed by
Jakub Kicinski
b11c8173 3a38a829

+2 -1
+2 -1
net/hsr/hsr_slave.c
··· 220 220 netdev_update_features(master->dev); 221 221 dev_set_mtu(master->dev, hsr_get_max_mtu(hsr)); 222 222 netdev_rx_handler_unregister(port->dev); 223 - dev_set_promiscuity(port->dev, -1); 223 + if (!port->hsr->fwd_offloaded) 224 + dev_set_promiscuity(port->dev, -1); 224 225 netdev_upper_dev_unlink(port->dev, master->dev); 225 226 } 226 227