]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
xfrm: call xdo_dev_state_delete during state update
authorSabrina Dubroca <sd@queasysnail.net>
Mon, 23 Feb 2026 23:05:13 +0000 (00:05 +0100)
committerSteffen Klassert <steffen.klassert@secunet.com>
Wed, 25 Feb 2026 08:11:33 +0000 (09:11 +0100)
commit7d2fc41f91bc69acb6e01b0fa23cd7d0109a6a23
tree9c8a80a6e5ce6020c4953cc8a9d3041f18ef7646
parentb57defcf8f109da5ba9cf59b2a736606faf3d846
xfrm: call xdo_dev_state_delete during state update

When we update an SA, we construct a new state and call
xdo_dev_state_add, but never insert it. The existing state is updated,
then we immediately destroy the new state. Since we haven't added it,
we don't go through the standard state delete code, and we're skipping
removing it from the device (but xdo_dev_state_free will get called
when we destroy the temporary state).

This is similar to commit c5d4d7d83165 ("xfrm: Fix deletion of
offloaded SAs on failure.").

Fixes: d77e38e612a0 ("xfrm: Add an IPsec hardware offloading API")
Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
net/xfrm/xfrm_state.c