Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 122211
b: refs/heads/master
c: cdcbca7
h: refs/heads/master
i:
  122209: a4b5451
  122207: 213a25e
v: v3
  • Loading branch information
Alexey Dobriyan authored and David S. Miller committed Nov 26, 2008
1 parent 3826c0c commit dfee6dd
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8d1211a6aaea43ea36151c17b0193eb763ff2d7e
refs/heads/master: cdcbca7c1f1946758cfacb69bc1c7eeaccb11e2d
2 changes: 1 addition & 1 deletion trunk/include/net/xfrm.h
Original file line number Diff line number Diff line change
Expand Up @@ -1435,7 +1435,7 @@ static inline int xfrm4_udp_encap_rcv(struct sock *sk, struct sk_buff *skb)
struct xfrm_policy *xfrm_policy_alloc(struct net *net, gfp_t gfp);

extern void xfrm_policy_walk_init(struct xfrm_policy_walk *walk, u8 type);
extern int xfrm_policy_walk(struct xfrm_policy_walk *walk,
extern int xfrm_policy_walk(struct net *net, struct xfrm_policy_walk *walk,
int (*func)(struct xfrm_policy *, int, int, void*), void *);
extern void xfrm_policy_walk_done(struct xfrm_policy_walk *walk);
int xfrm_policy_insert(int dir, struct xfrm_policy *policy, int excl);
Expand Down
4 changes: 2 additions & 2 deletions trunk/net/key/af_key.c
Original file line number Diff line number Diff line change
Expand Up @@ -1846,7 +1846,7 @@ static u32 gen_reqid(void)
if (reqid == 0)
reqid = IPSEC_MANUAL_REQID_MAX+1;
xfrm_policy_walk_init(&walk, XFRM_POLICY_TYPE_MAIN);
rc = xfrm_policy_walk(&walk, check_reqid, (void*)&reqid);
rc = xfrm_policy_walk(&init_net, &walk, check_reqid, (void*)&reqid);
xfrm_policy_walk_done(&walk);
if (rc != -EEXIST)
return reqid;
Expand Down Expand Up @@ -2633,7 +2633,7 @@ static int dump_sp(struct xfrm_policy *xp, int dir, int count, void *ptr)

static int pfkey_dump_sp(struct pfkey_sock *pfk)
{
return xfrm_policy_walk(&pfk->dump.u.policy, dump_sp, (void *) pfk);
return xfrm_policy_walk(&init_net, &pfk->dump.u.policy, dump_sp, (void *) pfk);
}

static void pfkey_dump_sp_done(struct pfkey_sock *pfk)
Expand Down
6 changes: 3 additions & 3 deletions trunk/net/xfrm/xfrm_policy.c
Original file line number Diff line number Diff line change
Expand Up @@ -851,7 +851,7 @@ int xfrm_policy_flush(struct net *net, u8 type, struct xfrm_audit *audit_info)
}
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*),
void *data)
{
Expand All @@ -868,10 +868,10 @@ int xfrm_policy_walk(struct xfrm_policy_walk *walk,

write_lock_bh(&xfrm_policy_lock);
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
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)
continue;
pol = container_of(x, struct xfrm_policy, walk);
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/xfrm/xfrm_user.c
Original file line number Diff line number Diff line change
Expand Up @@ -1279,7 +1279,7 @@ static int xfrm_dump_policy(struct sk_buff *skb, struct netlink_callback *cb)
xfrm_policy_walk_init(walk, XFRM_POLICY_TYPE_ANY);
}

(void) xfrm_policy_walk(walk, dump_one_policy, &info);
(void) xfrm_policy_walk(&init_net, walk, dump_one_policy, &info);

return skb->len;
}
Expand Down

0 comments on commit dfee6dd

Please sign in to comment.