]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
xfrm: remove redundant assignments
authorAntony Antony <antony.antony@secunet.com>
Tue, 26 May 2026 19:05:54 +0000 (21:05 +0200)
committerSteffen Klassert <steffen.klassert@secunet.com>
Thu, 4 Jun 2026 10:22:33 +0000 (12:22 +0200)
These 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));

Reviewed-by: Sabrina Dubroca <sd@queasysnail.net>
Signed-off-by: Antony Antony <antony.antony@secunet.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
net/xfrm/xfrm_state.c

index 1748d374abcab38949d0b9958fce0bbcc3c7e054..9417a025270c36b440d5b995d7f1199f2091ce7c 100644 (file)
@@ -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);