linux/include
Taehee Yoo 9a5605505d bonding: Add struct bond_ipesc to manage SA
bonding has been supporting ipsec offload.
When SA is added, bonding just passes SA to its own active real interface.
But it doesn't manage SA.
So, when events(add/del real interface, active real interface change, etc)
occur, bonding can't handle that well because It doesn't manage SA.
So some problems(panic, UAF, refcnt leak)occur.

In order to make it stable, it should manage SA.
That's the reason why struct bond_ipsec is added.
When a new SA is added to bonding interface, it is stored in the
bond_ipsec list. And the SA is passed to a current active real interface.
If events occur, it uses bond_ipsec data to handle these events.
bond->ipsec_list is protected by bond->ipsec_lock.

If a current active real interface is changed, the following logic works.
1. delete all SAs from old active real interface
2. Add all SAs to the new active real interface.
3. If a new active real interface doesn't support ipsec offload or SA's
option, it sets real_dev to NULL.

Fixes: 18cb261afd ("bonding: support hardware encryption offload to slaves")
Signed-off-by: Taehee Yoo <ap420073@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-07-06 10:36:59 -07:00
..
acpi Device properties framework updates for 5.14-rc1 2021-06-29 14:04:37 -07:00
asm-generic Networking changes for 5.14. 2021-06-30 15:51:09 -07:00
clocksource
crypto crypto: api - Move crypto attr definitions out of crypto.h 2021-06-24 14:51:35 +08:00
drm
dt-bindings
keys
kunit kunit: make test->lock irq safe 2021-06-29 10:53:46 -07:00
kvm
linux net: stmmac: ptp: update tas basetime after ptp adjust 2021-07-05 10:16:17 -07:00
math-emu
media media: Fix Media Controller API config checks 2021-06-24 14:26:00 +02:00
memory
misc
net bonding: Add struct bond_ipesc to manage SA 2021-07-06 10:36:59 -07:00
pcmcia
ras
rdma
scsi
soc mbox: add polarfire soc system controller mailbox 2021-06-26 12:06:48 -05:00
sound
target
trace Networking changes for 5.14. 2021-06-30 15:51:09 -07:00
uapi net: sock: extend SO_TIMESTAMPING for PHC binding 2021-07-01 13:08:18 -07:00
vdso
video
xen