From: Antony Antony <antony.antony@secunet.com>
To: Antony Antony <antony.antony@secunet.com>,
Steffen Klassert <steffen.klassert@secunet.com>,
Herbert Xu <herbert@gondor.apana.org.au>,
<netdev@vger.kernel.org>
Cc: "David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Chiachang Wang <chiachangwang@google.com>,
Yan Yan <evitayan@google.com>,
Shinta Sugimoto <shinta.sugimoto@ericsson.com>,
<devel@linux-ipsec.org>, Simon Horman <horms@kernel.org>,
<linux-kernel@vger.kernel.org>
Subject: [PATCH ipsec-next v2 1/4] xfrm: remove redundant assignments
Date: Thu, 15 Jan 2026 09:04:23 +0100 [thread overview]
Message-ID: <c975b4b6573d712af9e0bf4fe04d58e7b6520133.1768462955.git.antony.antony@secunet.com> (raw)
In-Reply-To: <cover.1768462955.git.antony.antony@secunet.com>
This assignments are overwritten within the same function further down
commit e8961c50ee9cc ("xfrm: Refactor migration setup
during the cloning process")
x->props.family = m->new_family;
Which actually moved it in the
commit e03c3bba351f9 ("xfrm: Fix xfrm migrate issues
when address family changes")
And the initial
commit 80c9abaabf428 ("[XFRM]: Extension for dynamic
update of endpoint address(es)")
added x->props.saddr = orig->props.saddr; and
memcpy(&xc->props.saddr, &m->new_saddr, sizeof(xc->props.saddr));
Signed-off-by: Antony Antony <antony.antony@secunet.com>
---
v1->v2: remove extra saddr copy, previous line
---
net/xfrm/xfrm_state.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c
index 9e14e453b55c..4fd73a970a7a 100644
--- a/net/xfrm/xfrm_state.c
+++ b/net/xfrm/xfrm_state.c
@@ -1980,8 +1980,6 @@ static struct xfrm_state *xfrm_state_clone_and_setup(struct xfrm_state *orig,
x->props.mode = orig->props.mode;
x->props.replay_window = orig->props.replay_window;
x->props.reqid = orig->props.reqid;
- x->props.family = orig->props.family;
- x->props.saddr = orig->props.saddr;
if (orig->aalg) {
x->aalg = xfrm_algo_auth_clone(orig->aalg);
--
2.39.5
next parent reply other threads:[~2026-01-15 8:04 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <cover.1768462955.git.antony.antony@secunet.com>
2026-01-15 8:04 ` Antony Antony [this message]
2026-01-15 8:04 ` [PATCH ipsec-next v2 2/4] xfrm: allow migration from UDP encapsulated to non-encapsulated ESP Antony Antony
2026-01-15 8:05 ` [PATCH ipsec-next v2 3/4] xfrm: rename reqid in xfrm_migrate Antony Antony
2026-01-15 8:05 ` [PATCH ipsec-next v2 4/4] xfrm: add XFRM_MSG_MIGRATE_STATE for single SA migration Antony Antony
[not found] <cover.1768679141.git.antony.antony@secunet.com>
2026-01-17 19:58 ` [PATCH ipsec-next v2 1/4] xfrm: remove redundant assignments Antony Antony
2026-01-17 19:59 ` Antony Antony
2026-01-17 20:06 ` 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=c975b4b6573d712af9e0bf4fe04d58e7b6520133.1768462955.git.antony.antony@secunet.com \
--to=antony.antony@secunet.com \
--cc=chiachangwang@google.com \
--cc=davem@davemloft.net \
--cc=devel@linux-ipsec.org \
--cc=edumazet@google.com \
--cc=evitayan@google.com \
--cc=herbert@gondor.apana.org.au \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=shinta.sugimoto@ericsson.com \
--cc=steffen.klassert@secunet.com \
/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
all inboxes | Powered by JetHome®