aboutsummaryrefslogtreecommitdiffstats
path: root/net/xfrm/xfrm_policy.c
diff options
context:
space:
mode:
authorAlexey Dobriyan <adobriyan@gmail.com>2008-11-25 21:00:14 -0500
committerDavid S. Miller <davem@davemloft.net>2008-11-25 21:00:14 -0500
commitc68cd1a01ba56995d85a4a62b195b2b3f6415c64 (patch)
tree69351005622aced7acf9085fa5c54134419286ba /net/xfrm/xfrm_policy.c
parent59c9940ed0ef026673cac52f2eaed77af7d486da (diff)
netns xfrm: /proc/net/xfrm_stat 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_policy.c')
-rw-r--r--net/xfrm/xfrm_policy.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c
index e239a25e571c..38822b34ba7d 100644
--- a/net/xfrm/xfrm_policy.c
+++ b/net/xfrm/xfrm_policy.c
@@ -2377,14 +2377,20 @@ static struct notifier_block xfrm_dev_notifier = {
2377#ifdef CONFIG_XFRM_STATISTICS 2377#ifdef CONFIG_XFRM_STATISTICS
2378static int __net_init xfrm_statistics_init(struct net *net) 2378static int __net_init xfrm_statistics_init(struct net *net)
2379{ 2379{
2380 int rv;
2381
2380 if (snmp_mib_init((void **)net->mib.xfrm_statistics, 2382 if (snmp_mib_init((void **)net->mib.xfrm_statistics,
2381 sizeof(struct linux_xfrm_mib)) < 0) 2383 sizeof(struct linux_xfrm_mib)) < 0)
2382 return -ENOMEM; 2384 return -ENOMEM;
2383 return 0; 2385 rv = xfrm_proc_init(net);
2386 if (rv < 0)
2387 snmp_mib_free((void **)net->mib.xfrm_statistics);
2388 return rv;
2384} 2389}
2385 2390
2386static void xfrm_statistics_fini(struct net *net) 2391static void xfrm_statistics_fini(struct net *net)
2387{ 2392{
2393 xfrm_proc_fini(net);
2388 snmp_mib_free((void **)net->mib.xfrm_statistics); 2394 snmp_mib_free((void **)net->mib.xfrm_statistics);
2389} 2395}
2390#else 2396#else
@@ -2524,9 +2530,6 @@ void __init xfrm_init(void)
2524{ 2530{
2525 register_pernet_subsys(&xfrm_net_ops); 2531 register_pernet_subsys(&xfrm_net_ops);
2526 xfrm_input_init(); 2532 xfrm_input_init();
2527#ifdef CONFIG_XFRM_STATISTICS
2528 xfrm_proc_init();
2529#endif
2530} 2533}
2531 2534
2532#ifdef CONFIG_AUDITSYSCALL 2535#ifdef CONFIG_AUDITSYSCALL