diff options
author | Alexey Dobriyan <adobriyan@gmail.com> | 2008-11-25 20:34:49 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-11-25 20:34:49 -0500 |
commit | cdcbca7c1f1946758cfacb69bc1c7eeaccb11e2d (patch) | |
tree | 1ee0f5edf7fb9e50f7f70c680044be33d41a0d41 /net/key/af_key.c | |
parent | 8d1211a6aaea43ea36151c17b0193eb763ff2d7e (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/key/af_key.c')
-rw-r--r-- | net/key/af_key.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/key/af_key.c b/net/key/af_key.c index ca268116ac11..a0d849848ddd 100644 --- a/net/key/af_key.c +++ b/net/key/af_key.c | |||
@@ -1846,7 +1846,7 @@ static u32 gen_reqid(void) | |||
1846 | if (reqid == 0) | 1846 | if (reqid == 0) |
1847 | reqid = IPSEC_MANUAL_REQID_MAX+1; | 1847 | reqid = IPSEC_MANUAL_REQID_MAX+1; |
1848 | xfrm_policy_walk_init(&walk, XFRM_POLICY_TYPE_MAIN); | 1848 | xfrm_policy_walk_init(&walk, XFRM_POLICY_TYPE_MAIN); |
1849 | rc = xfrm_policy_walk(&walk, check_reqid, (void*)&reqid); | 1849 | rc = xfrm_policy_walk(&init_net, &walk, check_reqid, (void*)&reqid); |
1850 | xfrm_policy_walk_done(&walk); | 1850 | xfrm_policy_walk_done(&walk); |
1851 | if (rc != -EEXIST) | 1851 | if (rc != -EEXIST) |
1852 | return reqid; | 1852 | return reqid; |
@@ -2633,7 +2633,7 @@ static int dump_sp(struct xfrm_policy *xp, int dir, int count, void *ptr) | |||
2633 | 2633 | ||
2634 | static int pfkey_dump_sp(struct pfkey_sock *pfk) | 2634 | static int pfkey_dump_sp(struct pfkey_sock *pfk) |
2635 | { | 2635 | { |
2636 | return xfrm_policy_walk(&pfk->dump.u.policy, dump_sp, (void *) pfk); | 2636 | return xfrm_policy_walk(&init_net, &pfk->dump.u.policy, dump_sp, (void *) pfk); |
2637 | } | 2637 | } |
2638 | 2638 | ||
2639 | static void pfkey_dump_sp_done(struct pfkey_sock *pfk) | 2639 | static void pfkey_dump_sp_done(struct pfkey_sock *pfk) |