aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/xfrm/xfrm_state.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c
index 17d5b96f2fc8..71f8f33d637b 100644
--- a/net/xfrm/xfrm_state.c
+++ b/net/xfrm/xfrm_state.c
@@ -37,7 +37,6 @@
37static DEFINE_SPINLOCK(xfrm_state_lock); 37static DEFINE_SPINLOCK(xfrm_state_lock);
38 38
39static unsigned int xfrm_state_hashmax __read_mostly = 1 * 1024 * 1024; 39static unsigned int xfrm_state_hashmax __read_mostly = 1 * 1024 * 1024;
40static unsigned int xfrm_state_genid;
41 40
42static struct xfrm_state_afinfo *xfrm_state_get_afinfo(unsigned int family); 41static struct xfrm_state_afinfo *xfrm_state_get_afinfo(unsigned int family);
43static void xfrm_state_put_afinfo(struct xfrm_state_afinfo *afinfo); 42static void xfrm_state_put_afinfo(struct xfrm_state_afinfo *afinfo);
@@ -923,8 +922,6 @@ static void __xfrm_state_insert(struct xfrm_state *x)
923 struct net *net = xs_net(x); 922 struct net *net = xs_net(x);
924 unsigned int h; 923 unsigned int h;
925 924
926 x->genid = ++xfrm_state_genid;
927
928 list_add(&x->km.all, &net->xfrm.state_all); 925 list_add(&x->km.all, &net->xfrm.state_all);
929 926
930 h = xfrm_dst_hash(net, &x->id.daddr, &x->props.saddr, 927 h = xfrm_dst_hash(net, &x->id.daddr, &x->props.saddr,
@@ -970,7 +967,7 @@ static void __xfrm_state_bump_genids(struct xfrm_state *xnew)
970 (mark & x->mark.m) == x->mark.v && 967 (mark & x->mark.m) == x->mark.v &&
971 !xfrm_addr_cmp(&x->id.daddr, &xnew->id.daddr, family) && 968 !xfrm_addr_cmp(&x->id.daddr, &xnew->id.daddr, family) &&
972 !xfrm_addr_cmp(&x->props.saddr, &xnew->props.saddr, family)) 969 !xfrm_addr_cmp(&x->props.saddr, &xnew->props.saddr, family))
973 x->genid = xfrm_state_genid; 970 x->genid++;
974 } 971 }
975} 972}
976 973