]> git.baikalelectronics.ru Git - kernel.git/commit
xfrm: replay: avoid xfrm replay notify indirection
authorFlorian Westphal <fw@strlen.de>
Fri, 18 Jun 2021 13:51:56 +0000 (15:51 +0200)
committerSteffen Klassert <steffen.klassert@secunet.com>
Mon, 21 Jun 2021 07:55:06 +0000 (09:55 +0200)
commit924be8f7c7e859c092b303061184edd9d6af316b
tree2262ae0b45a3759bb064eb83d0e1fa601bfafae4
parentfa7c69c96c499ca11cdc35bcbad1672a4237ce5a
xfrm: replay: avoid xfrm replay notify indirection

replay protection is implemented using a callback structure and then
called via

   x->repl->notify(), x->repl->recheck(), and so on.

all the differect functions are always built-in, so this could be direct
calls instead.

This first patch prepares for removal of the x->repl structure.
Add an enum with the three available replay modes to the xfrm_state
structure and then replace all x->repl->notify() calls by the new
xfrm_replay_notify() helper.

The helper checks the enum internally to adapt behaviour as needed.

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
include/net/xfrm.h
net/xfrm/xfrm_replay.c
net/xfrm/xfrm_state.c