xfrm: security: iterate all, not inexact lists
authorFlorian Westphal <fw@strlen.de>
Wed, 7 Nov 2018 22:00:32 +0000 (23:00 +0100)
committerSteffen Klassert <steffen.klassert@secunet.com>
Fri, 9 Nov 2018 10:57:22 +0000 (11:57 +0100)
commitceb159e30ad22efa0981d544e6166003515aa896
tree8a95585a7b26efd56fafb075995b3fb17810255a
parentb69d540da7db84e836cea77fbd56a518aafa1f2f
xfrm: security: iterate all, not inexact lists

currently all non-socket policies are either hashed in the dst table,
or placed on the 'inexact list'.  When flushing, we first walk the
table, then the (per-direction) inexact lists.

When we try and get rid of the inexact lists to having "n" inexact
lists (e.g. per-af inexact lists, or sorted into a tree), this walk
would become more complicated.

Simplify this: walk the 'all' list and skip socket policies during
traversal so we don't need to handle exact and inexact policies
separately anymore.

Signed-off-by: Florian Westphal <fw@strlen.de>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
net/xfrm/xfrm_policy.c