mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2026-07-08 18:13:59 +02:00
net: hsr: hsr_slave: Fix the promiscuous mode in offload mode
commitb11c81731cupstream. commite748d0fd66("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:e748d0fd66("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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
99f7048957
commit
5f2f50aa44
+2
-1
@@ -226,7 +226,8 @@ void hsr_del_port(struct hsr_port *port)
|
||||
netdev_update_features(master->dev);
|
||||
dev_set_mtu(master->dev, hsr_get_max_mtu(hsr));
|
||||
netdev_rx_handler_unregister(port->dev);
|
||||
dev_set_promiscuity(port->dev, -1);
|
||||
if (!port->hsr->fwd_offloaded)
|
||||
dev_set_promiscuity(port->dev, -1);
|
||||
netdev_upper_dev_unlink(port->dev, master->dev);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user