summaryrefslogtreecommitdiffstats
path: root/net/ipv6/xfrm6_policy.c
diff options
context:
space:
mode:
authorDavid S. Miller2006-08-24 12:18:09 +0200
committerDavid S. Miller2006-09-23 00:08:42 +0200
commit9d4a706d852411154d0c91b9ffb3bec68b94b25c (patch)
tree1613607168baa8b654c300895cd7d0ffb6f18581 /net/ipv6/xfrm6_policy.c
parent[XFRM]: Dynamic xfrm_state hash table sizing. (diff)
downloadkernel-qcow2-linux-9d4a706d852411154d0c91b9ffb3bec68b94b25c.tar.gz
kernel-qcow2-linux-9d4a706d852411154d0c91b9ffb3bec68b94b25c.tar.xz
kernel-qcow2-linux-9d4a706d852411154d0c91b9ffb3bec68b94b25c.zip
[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 'net/ipv6/xfrm6_policy.c')
-rw-r--r--net/ipv6/xfrm6_policy.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/ipv6/xfrm6_policy.c b/net/ipv6/xfrm6_policy.c
index 98c2fe449b3f..9391c4c94feb 100644
--- a/net/ipv6/xfrm6_policy.c
+++ b/net/ipv6/xfrm6_policy.c
@@ -149,6 +149,7 @@ __xfrm6_bundle_create(struct xfrm_policy *policy, struct xfrm_state **xfrm, int
xdst = (struct xfrm_dst *)dst1;
xdst->route = &rt->u.dst;
+ xdst->genid = xfrm[i]->genid;
if (rt->rt6i_node)
xdst->route_cookie = rt->rt6i_node->fn_sernum;