aboutsummaryrefslogtreecommitdiffstats
path: root/net/xfrm/xfrm_state.c
diff options
context:
space:
mode:
authorAlexey Dobriyan <adobriyan@gmail.com>2008-11-25 20:32:14 -0500
committerDavid S. Miller <davem@davemloft.net>2008-11-25 20:32:14 -0500
commit284fa7da300adcb700b44df2f64a536b434d4650 (patch)
tree382f31cff91d68085b03bd4df639fd7ad3c78051 /net/xfrm/xfrm_state.c
parent5447c5e401c49aba0c36bb1066f2d25b152553b7 (diff)
netns xfrm: state 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_state.c')
-rw-r--r--net/xfrm/xfrm_state.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c
index 0d974fc9dd6c..ea340bbbcc64 100644
--- a/net/xfrm/xfrm_state.c
+++ b/net/xfrm/xfrm_state.c
@@ -1544,7 +1544,7 @@ unlock:
1544} 1544}
1545EXPORT_SYMBOL(xfrm_alloc_spi); 1545EXPORT_SYMBOL(xfrm_alloc_spi);
1546 1546
1547int xfrm_state_walk(struct xfrm_state_walk *walk, 1547int xfrm_state_walk(struct net *net, struct xfrm_state_walk *walk,
1548 int (*func)(struct xfrm_state *, int, void*), 1548 int (*func)(struct xfrm_state *, int, void*),
1549 void *data) 1549 void *data)
1550{ 1550{
@@ -1557,10 +1557,10 @@ int xfrm_state_walk(struct xfrm_state_walk *walk,
1557 1557
1558 spin_lock_bh(&xfrm_state_lock); 1558 spin_lock_bh(&xfrm_state_lock);
1559 if (list_empty(&walk->all)) 1559 if (list_empty(&walk->all))
1560 x = list_first_entry(&init_net.xfrm.state_all, struct xfrm_state_walk, all); 1560 x = list_first_entry(&net->xfrm.state_all, struct xfrm_state_walk, all);
1561 else 1561 else
1562 x = list_entry(&walk->all, struct xfrm_state_walk, all); 1562 x = list_entry(&walk->all, struct xfrm_state_walk, all);
1563 list_for_each_entry_from(x, &init_net.xfrm.state_all, all) { 1563 list_for_each_entry_from(x, &net->xfrm.state_all, all) {
1564 if (x->state == XFRM_STATE_DEAD) 1564 if (x->state == XFRM_STATE_DEAD)
1565 continue; 1565 continue;
1566 state = container_of(x, struct xfrm_state, km); 1566 state = container_of(x, struct xfrm_state, km);