[XFRM]: Add generation count to xfrm_state and xfrm_dst.
authorDavid S. Miller <davem@sunset.davemloft.net>
Thu, 24 Aug 2006 10:18:09 +0000 (03:18 -0700)
committerDavid S. Miller <davem@sunset.davemloft.net>
Fri, 22 Sep 2006 22:08:42 +0000 (15:08 -0700)
commit9d4a706d852411154d0c91b9ffb3bec68b94b25c
tree1613607168baa8b654c300895cd7d0ffb6f18581
parentf034b5d4efdfe0fb9e2a1ce1d95fa7914f24de49
[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>
include/net/xfrm.h
net/ipv4/xfrm4_policy.c
net/ipv6/xfrm6_policy.c
net/xfrm/xfrm_policy.c
net/xfrm/xfrm_state.c