xfrm: Fix xfrm_replay_overflow_offload_esn
authorYossef Efraim <yossefe@mellanox.com>
Tue, 28 Nov 2017 09:49:28 +0000 (11:49 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 19 Mar 2018 07:42:50 +0000 (08:42 +0100)
commitab3db1af421005b9a33888ebe2b69cce81179b91
tree572845932c0a42e75880f5c14389e4278531fed5
parent5aac93adff9caa5920af52ea1db2a5dc2c1badd9
xfrm: Fix xfrm_replay_overflow_offload_esn

[ Upstream commit 0ba23a211360af7b6658e4fcfc571970bbbacc55 ]

In case of wrap around, replay_esn->oseq_hi is not updated
before it is tested for it's actual value, leading function
to fail with overflow indication and packets being dropped.

This patch updates replay_esn->oseq_hi in the right place.

Fixes: d7dbefc45cf5 ("xfrm: Add xfrm_replay_overflow functions for offloading")
Signed-off-by: Yossef Efraim <yossefe@mellanox.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/xfrm/xfrm_replay.c