Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Steffen Klassert <steffen.klassert@secunet.com>
To: Antony Antony <antony.antony@secunet.com>
Cc: <netdev@vger.kernel.org>,
Herbert Xu <herbert@gondor.apana.org.au>,
"Antony Antony" <antony@phenome.org>
Subject: Re: [PATCH v2 4/4] xfrm: clone whole liftime_cur structure in xfrm_do_migrate
Date: Fri, 28 Aug 2020 07:20:03 +0200 [thread overview]
Message-ID: <20200828052003.GD20687@gauss3.secunet.de> (raw)
In-Reply-To: <20200826194026.GA15058@moon.secunet.de>
On Wed, Aug 26, 2020 at 09:40:40PM +0200, Antony Antony wrote:
> When we clone state only add_time was cloned. It missed values like
> bytes, packets. Now clone the all members of the structure.
>
> Fixes: 80c9abaabf42 ("[XFRM]: Extension for dynamic update of endpoint address(es)")
> Signed-off-by: Antony Antony <antony.antony@secunet.com>
> ---
> net/xfrm/xfrm_state.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c
> index 16988303aed6..64eb4a6fcfc2 100644
> --- a/net/xfrm/xfrm_state.c
> +++ b/net/xfrm/xfrm_state.c
> @@ -1550,7 +1550,7 @@ static struct xfrm_state *xfrm_state_clone(struct xfrm_state *orig,
> x->tfcpad = orig->tfcpad;
> x->replay_maxdiff = orig->replay_maxdiff;
> x->replay_maxage = orig->replay_maxage;
> - x->curlft.add_time = orig->curlft.add_time;
> + x->curlft = orig->curlft;
You should use memcpy if you want to copy the whole structure.
next prev parent reply other threads:[~2020-08-28 5:20 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-20 18:11 [PATCH 1/3] xfrm: clone XFRMA_SET_MARK during xfrm_do_migrate Antony Antony
2020-08-20 18:14 ` [PATCH 2/3] xfrm: clone XFRMA_REPLAY_ESN_VAL in xfrm_do_migrate Antony Antony
2020-08-24 8:43 ` Steffen Klassert
2020-08-20 18:16 ` [PATCH 3/3] xfrm: clone XFRMA_SEC_CTX during xfrm_do_migrate Antony Antony
2020-08-24 8:46 ` Steffen Klassert
2020-08-24 8:39 ` [PATCH 1/3] xfrm: clone XFRMA_SET_MARK " Steffen Klassert
2020-08-26 19:39 ` [PATCH v2 1/4] xfrm: clone XFRMA_SET_MARK in xfrm_do_migrate Antony Antony
2020-08-26 19:39 ` [PATCH v2 2/4] xfrm: clone XFRMA_REPLAY_ESN_VAL " Antony Antony
2020-08-26 19:40 ` [PATCH v2 3/4] xfrm: clone XFRMA_SEC_CTX " Antony Antony
2020-08-28 5:18 ` Steffen Klassert
2020-08-26 19:40 ` [PATCH v2 4/4] xfrm: clone whole liftime_cur structure " Antony Antony
2020-08-28 5:20 ` Steffen Klassert [this message]
2020-09-04 6:49 ` [PATCH v3 1/4] xfrm: clone XFRMA_SET_MARK " Antony Antony
2020-09-09 5:54 ` Steffen Klassert
2020-09-04 6:49 ` [PATCH v3 2/4] xfrm: clone XFRMA_REPLAY_ESN_VAL " Antony Antony
2020-09-04 6:50 ` [PATCH v3 3/4] xfrm: clone XFRMA_SEC_CTX " Antony Antony
2020-09-04 6:50 ` [PATCH v3 4/4] xfrm: clone whole liftime_cur structure " Antony Antony
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=20200828052003.GD20687@gauss3.secunet.de \
--to=steffen.klassert@secunet.com \
--cc=antony.antony@secunet.com \
--cc=antony@phenome.org \
--cc=herbert@gondor.apana.org.au \
--cc=netdev@vger.kernel.org \
--subject='Re: [PATCH v2 4/4] xfrm: clone whole liftime_cur structure in xfrm_do_migrate' \
/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
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).