linux/drivers/net/bonding
Nikolay Aleksandrov 996ba2f0d7 bonding: fix xfrm state handling when clearing active slave
[ Upstream commit c4c5c5d2ef ]

If the active slave is cleared manually the xfrm state is not flushed.
This leads to xfrm add/del imbalance and adding the same state multiple
times. For example when the device cannot handle anymore states we get:
 [ 1169.884811] bond0: (slave eni0np1): bond_ipsec_add_sa_all: failed to add SA
because it's filled with the same state after multiple active slave
clearings. This change also has a few nice side effects: user-space
gets a notification for the change, the old device gets its mac address
and promisc/mcast adjusted properly.

Fixes: 18cb261afd ("bonding: support hardware encryption offload to slaves")
Signed-off-by: Nikolay Aleksandrov <razor@blackwall.org>
Reviewed-by: Hangbin Liu <liuhangbin@gmail.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2024-08-29 17:33:47 +02:00
..
bond_3ad.c drivers/net/bonding/bond_3ad: return when there's no aggregator 2023-01-03 09:17:12 +00:00
bond_alb.c bonding: return -ENOMEM instead of BUG in alb_upper_dev_walk 2024-02-05 20:14:19 +00:00
bond_debugfs.c bonding: remove redundant NULL check in debugfs function 2023-08-11 11:10:55 +01:00
bond_main.c bonding: fix xfrm real_dev null pointer dereference 2024-08-29 17:33:47 +02:00
bond_netlink.c bonding: fix send_peer_notif overflow 2023-05-10 09:27:20 +01:00
bond_options.c bonding: fix xfrm state handling when clearing active slave 2024-08-29 17:33:47 +02:00
bond_procfs.c bonding: show NS IPv6 targets in proc master info 2022-05-31 10:50:02 +02:00
bond_sysfs.c bonding: add modifier to initialization function and exit function 2023-08-11 11:10:55 +01:00
bond_sysfs_slave.c net: bonding: Convert to use sysfs_emit()/sysfs_emit_at() APIs 2022-09-30 12:29:45 +01:00
bonding_priv.h net: bonding: Add SPDX identifier to remaining files 2023-05-16 15:38:06 +02:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00