Skip to content

Commit 7d2fc41

Browse files
qsnklassert
authored andcommitted
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 c5d4d7d ("xfrm: Fix deletion of offloaded SAs on failure."). Fixes: d77e38e ("xfrm: Add an IPsec hardware offloading API") Signed-off-by: Sabrina Dubroca <[email protected]> Reviewed-by: Simon Horman <[email protected]> Signed-off-by: Steffen Klassert <[email protected]>
1 parent b57defc commit 7d2fc41

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

net/xfrm/xfrm_state.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2264,6 +2264,7 @@ int xfrm_state_update(struct xfrm_state *x)
22642264

22652265
err = 0;
22662266
x->km.state = XFRM_STATE_DEAD;
2267+
xfrm_dev_state_delete(x);
22672268
__xfrm_state_put(x);
22682269
}
22692270

0 commit comments

Comments
 (0)