Commit 225f40055f779032974a9fce7b2f9c9eda04ff58
Committed by
David S. Miller
1 parent
fd9ec7d31f
ipsec: Restore larval states and socket policies in dump
The commit commit 4c563f7669c10a12354b72b518c2287ffc6ebfb3 ("[XFRM]: Speed up xfrm_policy and xfrm_state walking") inadvertently removed larval states and socket policies from netlink dumps. This patch restores them. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
Showing 2 changed files with 3 additions and 0 deletions Side-by-side Diff
net/xfrm/xfrm_policy.c
... | ... | @@ -1077,6 +1077,7 @@ |
1077 | 1077 | struct hlist_head *chain = policy_hash_bysel(&pol->selector, |
1078 | 1078 | pol->family, dir); |
1079 | 1079 | |
1080 | + list_add_tail(&pol->bytype, &xfrm_policy_bytype[pol->type]); | |
1080 | 1081 | hlist_add_head(&pol->bydst, chain); |
1081 | 1082 | hlist_add_head(&pol->byidx, xfrm_policy_byidx+idx_hash(pol->index)); |
1082 | 1083 | xfrm_policy_count[dir]++; |
net/xfrm/xfrm_state.c
... | ... | @@ -858,6 +858,7 @@ |
858 | 858 | |
859 | 859 | if (km_query(x, tmpl, pol) == 0) { |
860 | 860 | x->km.state = XFRM_STATE_ACQ; |
861 | + list_add_tail(&x->all, &xfrm_state_all); | |
861 | 862 | hlist_add_head(&x->bydst, xfrm_state_bydst+h); |
862 | 863 | h = xfrm_src_hash(daddr, saddr, family); |
863 | 864 | hlist_add_head(&x->bysrc, xfrm_state_bysrc+h); |
... | ... | @@ -1055,6 +1056,7 @@ |
1055 | 1056 | xfrm_state_hold(x); |
1056 | 1057 | x->timer.expires = jiffies + sysctl_xfrm_acq_expires*HZ; |
1057 | 1058 | add_timer(&x->timer); |
1059 | + list_add_tail(&x->all, &xfrm_state_all); | |
1058 | 1060 | hlist_add_head(&x->bydst, xfrm_state_bydst+h); |
1059 | 1061 | h = xfrm_src_hash(daddr, saddr, family); |
1060 | 1062 | hlist_add_head(&x->bysrc, xfrm_state_bysrc+h); |