xfrm: Fix xfrm_replay_overflow_offload_esn
authorYossef Efraim <yossefe@mellanox.com>
Tue, 28 Nov 2017 09:49:28 +0000 (11:49 +0200)
committerSteffen Klassert <steffen.klassert@secunet.com>
Fri, 1 Dec 2017 06:10:01 +0000 (07:10 +0100)
commit0ba23a211360af7b6658e4fcfc571970bbbacc55
tree573a6e06940a401290f8eec7814f76525d5b53ab
parent5c0bb261d26189e1d7ece001b0accc7e14e6b20c
xfrm: Fix xfrm_replay_overflow_offload_esn

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>
net/xfrm/xfrm_replay.c