From: Steffen Klassert <steffen.klassert@secunet.com>
To: David Miller <davem@davemloft.net>, Jakub Kicinski <kuba@kernel.org>
Cc: Herbert Xu <herbert@gondor.apana.org.au>,
Steffen Klassert <steffen.klassert@secunet.com>,
<netdev@vger.kernel.org>
Subject: [PATCH 3/6] xfrm: fix a small bug in xfrm_sa_len()
Date: Thu, 6 Jan 2022 10:36:03 +0100 [thread overview]
Message-ID: <20220106093606.3046771-4-steffen.klassert@secunet.com> (raw)
In-Reply-To: <20220106093606.3046771-1-steffen.klassert@secunet.com>
From: Eric Dumazet <edumazet@google.com>
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: d77e38e612a01 ("xfrm: Add an IPsec hardware offloading API")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
---
net/xfrm/xfrm_user.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c
index 7c36cc1f3d79..0a2d2bae2831 100644
--- a/net/xfrm/xfrm_user.c
+++ b/net/xfrm/xfrm_user.c
@@ -3058,7 +3058,7 @@ static inline unsigned int xfrm_sa_len(struct xfrm_state *x)
if (x->props.extra_flags)
l += nla_total_size(sizeof(x->props.extra_flags));
if (x->xso.dev)
- l += nla_total_size(sizeof(x->xso));
+ l += nla_total_size(sizeof(struct xfrm_user_offload));
if (x->props.smark.v | x->props.smark.m) {
l += nla_total_size(sizeof(x->props.smark.v));
l += nla_total_size(sizeof(x->props.smark.m));
--
2.25.1
next prev parent reply other threads:[~2022-01-06 9:36 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-06 9:36 pull request (net): ipsec 2022-01-06 Steffen Klassert
2022-01-06 9:36 ` [PATCH 1/6] xfrm: fix policy lookup for ipv6 gre packets Steffen Klassert
2022-01-06 12:20 ` patchwork-bot+netdevbpf
2022-01-06 9:36 ` [PATCH 2/6] xfrm: fix dflt policy check when there is no policy configured Steffen Klassert
2022-01-06 9:36 ` Steffen Klassert [this message]
2022-01-06 9:36 ` [PATCH 4/6] xfrm: interface with if_id 0 should return error Steffen Klassert
2022-01-06 9:36 ` [PATCH 5/6] xfrm: state and policy should fail if XFRMA_IF_ID 0 Steffen Klassert
2022-01-06 9:36 ` [PATCH 6/6] net/xfrm: IPsec tunnel mode fix inner_ipproto setting in sec_path Steffen Klassert
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220106093606.3046771-4-steffen.klassert@secunet.com \
--to=steffen.klassert@secunet.com \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).