Skip to content

Commit 7770a39

Browse files
edumazetklassert
authored andcommitted
xfrm: fix a small bug in xfrm_sa_len()
copy_user_offload() will actually push a struct struct xfrm_user_offload, which is different than (struct xfrm_state *)->xso (struct xfrm_state_offload) Fixes: d77e38e ("xfrm: Add an IPsec hardware offloading API") Signed-off-by: Eric Dumazet <[email protected]> Cc: Steffen Klassert <[email protected]> Signed-off-by: Steffen Klassert <[email protected]>
1 parent ec3bb89 commit 7770a39

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/xfrm/xfrm_user.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3058,7 +3058,7 @@ static inline unsigned int xfrm_sa_len(struct xfrm_state *x)
30583058
if (x->props.extra_flags)
30593059
l += nla_total_size(sizeof(x->props.extra_flags));
30603060
if (x->xso.dev)
3061-
l += nla_total_size(sizeof(x->xso));
3061+
l += nla_total_size(sizeof(struct xfrm_user_offload));
30623062
if (x->props.smark.v | x->props.smark.m) {
30633063
l += nla_total_size(sizeof(x->props.smark.v));
30643064
l += nla_total_size(sizeof(x->props.smark.m));

0 commit comments

Comments
 (0)