aboutsummaryrefslogtreecommitdiffstats
path: root/net/xfrm/xfrm_policy.c
diff options
context:
space:
mode:
authorAlexey Dobriyan <adobriyan@gmail.com>2008-11-25 20:34:49 -0500
committerDavid S. Miller <davem@davemloft.net>2008-11-25 20:34:49 -0500
commitcdcbca7c1f1946758cfacb69bc1c7eeaccb11e2d (patch)
tree1ee0f5edf7fb9e50f7f70c680044be33d41a0d41 /net/xfrm/xfrm_policy.c
parent8d1211a6aaea43ea36151c17b0193eb763ff2d7e (diff)
netns xfrm: policy walking in netns
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/xfrm/xfrm_policy.c')
-rw-r--r--net/xfrm/xfrm_policy.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c
index 96895ef61858..6165218fd7c2 100644
--- a/net/xfrm/xfrm_policy.c
+++ b/net/xfrm/xfrm_policy.c
@@ -851,7 +851,7 @@ out:
851} 851}
852EXPORT_SYMBOL(xfrm_policy_flush); 852EXPORT_SYMBOL(xfrm_policy_flush);
853 853
854int xfrm_policy_walk(struct xfrm_policy_walk *walk, 854int xfrm_policy_walk(struct net *net, struct xfrm_policy_walk *walk,
855 int (*func)(struct xfrm_policy *, int, int, void*), 855 int (*func)(struct xfrm_policy *, int, int, void*),
856 void *data) 856 void *data)
857{ 857{
@@ -868,10 +868,10 @@ int xfrm_policy_walk(struct xfrm_policy_walk *walk,
868 868
869 write_lock_bh(&xfrm_policy_lock); 869 write_lock_bh(&xfrm_policy_lock);
870 if (list_empty(&walk->walk.all)) 870 if (list_empty(&walk->walk.all))
871 x = list_first_entry(&init_net.xfrm.policy_all, struct xfrm_policy_walk_entry, all); 871 x = list_first_entry(&net->xfrm.policy_all, struct xfrm_policy_walk_entry, all);
872 else 872 else
873 x = list_entry(&walk->walk.all, struct xfrm_policy_walk_entry, all); 873 x = list_entry(&walk->walk.all, struct xfrm_policy_walk_entry, all);
874 list_for_each_entry_from(x, &init_net.xfrm.policy_all, all) { 874 list_for_each_entry_from(x, &net->xfrm.policy_all, all) {
875 if (x->dead) 875 if (x->dead)
876 continue; 876 continue;
877 pol = container_of(x, struct xfrm_policy, walk); 877 pol = container_of(x, struct xfrm_policy, walk);