Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 122206
b: refs/heads/master
c: 284fa7d
h: refs/heads/master
v: v3
  • Loading branch information
Alexey Dobriyan authored and David S. Miller committed Nov 26, 2008
1 parent 690ad0c commit e9384d3
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 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: 5447c5e401c49aba0c36bb1066f2d25b152553b7
refs/heads/master: 284fa7da300adcb700b44df2f64a536b434d4650
2 changes: 1 addition & 1 deletion trunk/include/net/xfrm.h
Original file line number Diff line number Diff line change
Expand Up @@ -1307,7 +1307,7 @@ extern int xfrm_proc_init(void);
#endif

extern void xfrm_state_walk_init(struct xfrm_state_walk *walk, u8 proto);
extern int xfrm_state_walk(struct xfrm_state_walk *walk,
extern int xfrm_state_walk(struct net *net, struct xfrm_state_walk *walk,
int (*func)(struct xfrm_state *, int, void*), void *);
extern void xfrm_state_walk_done(struct xfrm_state_walk *walk);
extern struct xfrm_state *xfrm_state_alloc(struct net *net);
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/key/af_key.c
Original file line number Diff line number Diff line change
Expand Up @@ -1776,7 +1776,7 @@ static int dump_sa(struct xfrm_state *x, int count, void *ptr)

static int pfkey_dump_sa(struct pfkey_sock *pfk)
{
return xfrm_state_walk(&pfk->dump.u.state, dump_sa, (void *) pfk);
return xfrm_state_walk(&init_net, &pfk->dump.u.state, dump_sa, (void *) pfk);
}

static void pfkey_dump_sa_done(struct pfkey_sock *pfk)
Expand Down
6 changes: 3 additions & 3 deletions trunk/net/xfrm/xfrm_state.c
Original file line number Diff line number Diff line change
Expand Up @@ -1544,7 +1544,7 @@ int xfrm_alloc_spi(struct xfrm_state *x, u32 low, u32 high)
}
EXPORT_SYMBOL(xfrm_alloc_spi);

int xfrm_state_walk(struct xfrm_state_walk *walk,
int xfrm_state_walk(struct net *net, struct xfrm_state_walk *walk,
int (*func)(struct xfrm_state *, int, void*),
void *data)
{
Expand All @@ -1557,10 +1557,10 @@ int xfrm_state_walk(struct xfrm_state_walk *walk,

spin_lock_bh(&xfrm_state_lock);
if (list_empty(&walk->all))
x = list_first_entry(&init_net.xfrm.state_all, struct xfrm_state_walk, all);
x = list_first_entry(&net->xfrm.state_all, struct xfrm_state_walk, all);
else
x = list_entry(&walk->all, struct xfrm_state_walk, all);
list_for_each_entry_from(x, &init_net.xfrm.state_all, all) {
list_for_each_entry_from(x, &net->xfrm.state_all, all) {
if (x->state == XFRM_STATE_DEAD)
continue;
state = container_of(x, struct xfrm_state, km);
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 @@ -631,7 +631,7 @@ static int xfrm_dump_sa(struct sk_buff *skb, struct netlink_callback *cb)
xfrm_state_walk_init(walk, 0);
}

(void) xfrm_state_walk(walk, dump_one_state, &info);
(void) xfrm_state_walk(&init_net, walk, dump_one_state, &info);

return skb->len;
}
Expand Down

0 comments on commit e9384d3

Please sign in to comment.