|
@@ -851,7 +851,7 @@ out:
|
|
}
|
|
}
|
|
EXPORT_SYMBOL(xfrm_policy_flush);
|
|
EXPORT_SYMBOL(xfrm_policy_flush);
|
|
|
|
|
|
-int xfrm_policy_walk(struct xfrm_policy_walk *walk,
|
|
|
|
|
|
+int xfrm_policy_walk(struct net *net, struct xfrm_policy_walk *walk,
|
|
int (*func)(struct xfrm_policy *, int, int, void*),
|
|
int (*func)(struct xfrm_policy *, int, int, void*),
|
|
void *data)
|
|
void *data)
|
|
{
|
|
{
|
|
@@ -868,10 +868,10 @@ int xfrm_policy_walk(struct xfrm_policy_walk *walk,
|
|
|
|
|
|
write_lock_bh(&xfrm_policy_lock);
|
|
write_lock_bh(&xfrm_policy_lock);
|
|
if (list_empty(&walk->walk.all))
|
|
if (list_empty(&walk->walk.all))
|
|
- x = list_first_entry(&init_net.xfrm.policy_all, struct xfrm_policy_walk_entry, all);
|
|
|
|
|
|
+ x = list_first_entry(&net->xfrm.policy_all, struct xfrm_policy_walk_entry, all);
|
|
else
|
|
else
|
|
x = list_entry(&walk->walk.all, struct xfrm_policy_walk_entry, all);
|
|
x = list_entry(&walk->walk.all, struct xfrm_policy_walk_entry, all);
|
|
- list_for_each_entry_from(x, &init_net.xfrm.policy_all, all) {
|
|
|
|
|
|
+ list_for_each_entry_from(x, &net->xfrm.policy_all, all) {
|
|
if (x->dead)
|
|
if (x->dead)
|
|
continue;
|
|
continue;
|
|
pol = container_of(x, struct xfrm_policy, walk);
|
|
pol = container_of(x, struct xfrm_policy, walk);
|