提交 aafd0d88 编写于 作者: U Ulrich Weber 提交者: Steffen Klassert

xfrm: remove redundant replay_esn check

x->replay_esn is already checked in if clause,
so remove check and ident properly
Signed-off-by: NUlrich Weber <ulrich.weber@sophos.com>
Signed-off-by: NSteffen Klassert <steffen.klassert@secunet.com>
上级 f1e0b5b4
......@@ -521,13 +521,12 @@ int xfrm_init_replay(struct xfrm_state *x)
replay_esn->bmp_len * sizeof(__u32) * 8)
return -EINVAL;
if ((x->props.flags & XFRM_STATE_ESN) && replay_esn->replay_window == 0)
return -EINVAL;
if ((x->props.flags & XFRM_STATE_ESN) && x->replay_esn)
x->repl = &xfrm_replay_esn;
else
x->repl = &xfrm_replay_bmp;
if (x->props.flags & XFRM_STATE_ESN) {
if (replay_esn->replay_window == 0)
return -EINVAL;
x->repl = &xfrm_replay_esn;
} else
x->repl = &xfrm_replay_bmp;
} else
x->repl = &xfrm_replay_legacy;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册