Skip to content

Commit

Permalink
xfrm: policy: store inexact policies in a tree ordered by destination…
Browse files Browse the repository at this point in the history
… address

This adds inexact lists per destination network, stored in a search tree.

Inexact lookups now return two 'candidate lists', the 'any' policies
('any' destionations), and a list of policies that share same
daddr/prefix.

Next patch will add a second search tree for 'saddr:any' policies
so we can avoid placing those on the 'any:any' list too.

Signed-off-by: Florian Westphal <[email protected]>
Acked-by: David S. Miller <[email protected]>
Signed-off-by: Steffen Klassert <[email protected]>
  • Loading branch information
Florian Westphal authored and klassert committed Nov 9, 2018
1 parent 6be3b0d commit 9cf545e
Show file tree
Hide file tree
Showing 2 changed files with 328 additions and 6 deletions.
1 change: 1 addition & 0 deletions include/net/xfrm.h
Original file line number Diff line number Diff line change
Expand Up @@ -590,6 +590,7 @@ struct xfrm_policy {
struct xfrm_lifetime_cur curlft;
struct xfrm_policy_walk_entry walk;
struct xfrm_policy_queue polq;
bool bydst_reinsert;
u8 type;
u8 action;
u8 flags;
Expand Down
Loading

0 comments on commit 9cf545e

Please sign in to comment.