aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDavid S. Miller <davem@sunset.davemloft.net>2006-08-24 06:18:09 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2006-09-22 18:08:42 -0400
commit9d4a706d852411154d0c91b9ffb3bec68b94b25c (patch)
tree1613607168baa8b654c300895cd7d0ffb6f18581 /include
parentf034b5d4efdfe0fb9e2a1ce1d95fa7914f24de49 (diff)
[XFRM]: Add generation count to xfrm_state and xfrm_dst.
Each xfrm_state inserted gets a new generation counter value. When a bundle is created, the xfrm_dst objects get the current generation counter of the xfrm_state they will attach to at dst->xfrm. xfrm_bundle_ok() will return false if it sees an xfrm_dst with a generation count different from the generation count of the xfrm_state that dst points to. This provides a facility by which to passively and cheaply invalidate cached IPSEC routes during SA database changes. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/net/xfrm.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/net/xfrm.h b/include/net/xfrm.h
index 3405e5d9d51c..fd4a300b5baf 100644
--- a/include/net/xfrm.h
+++ b/include/net/xfrm.h
@@ -104,6 +104,8 @@ struct xfrm_state
104 struct xfrm_id id; 104 struct xfrm_id id;
105 struct xfrm_selector sel; 105 struct xfrm_selector sel;
106 106
107 u32 genid;
108
107 /* Key manger bits */ 109 /* Key manger bits */
108 struct { 110 struct {
109 u8 state; 111 u8 state;
@@ -590,6 +592,7 @@ struct xfrm_dst
590 struct rt6_info rt6; 592 struct rt6_info rt6;
591 } u; 593 } u;
592 struct dst_entry *route; 594 struct dst_entry *route;
595 u32 genid;
593 u32 route_mtu_cached; 596 u32 route_mtu_cached;
594 u32 child_mtu_cached; 597 u32 child_mtu_cached;
595 u32 route_cookie; 598 u32 route_cookie;