Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit aafd0d88 authored by Ulrich Weber's avatar Ulrich Weber Committed by Steffen Klassert
Browse files

xfrm: remove redundant replay_esn check



x->replay_esn is already checked in if clause,
so remove check and ident properly

Signed-off-by: default avatarUlrich Weber <ulrich.weber@sophos.com>
Signed-off-by: default avatarSteffen Klassert <steffen.klassert@secunet.com>
parent f1e0b5b4
Loading
Loading
Loading
Loading
+6 −7
Original line number Original line Diff line number Diff line
@@ -521,12 +521,11 @@ int xfrm_init_replay(struct xfrm_state *x)
		    replay_esn->bmp_len * sizeof(__u32) * 8)
		    replay_esn->bmp_len * sizeof(__u32) * 8)
			return -EINVAL;
			return -EINVAL;


	if ((x->props.flags & XFRM_STATE_ESN) && replay_esn->replay_window == 0)
		if (x->props.flags & XFRM_STATE_ESN) {
			if (replay_esn->replay_window == 0)
				return -EINVAL;
				return -EINVAL;

	if ((x->props.flags & XFRM_STATE_ESN) && x->replay_esn)
			x->repl = &xfrm_replay_esn;
			x->repl = &xfrm_replay_esn;
	else
		} else
			x->repl = &xfrm_replay_bmp;
			x->repl = &xfrm_replay_bmp;
	} else
	} else
		x->repl = &xfrm_replay_legacy;
		x->repl = &xfrm_replay_legacy;