aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/udplite.c
diff options
context:
space:
mode:
authorPavel Emelyanov <xemul@openvz.org>2008-03-24 17:56:57 -0400
committerDavid S. Miller <davem@davemloft.net>2008-03-24 17:56:57 -0400
commit84c375af0ff61e0bd15fac0aed0438640494483e (patch)
tree04df8259aef29b1d7eebd4e98988cf5e995527b9 /net/ipv6/udplite.c
parentff2bac6a63e3694e7a97152b7e934fe244e2a858 (diff)
[NETNS][UDP-Lite]: Register /proc/net/udplite(6) in a namespace.
UDP-Lite sockets are displayed in another files, rather than UDP ones, so make the present in namespaces as well. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/udplite.c')
-rw-r--r--net/ipv6/udplite.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/net/ipv6/udplite.c b/net/ipv6/udplite.c
index 93e52e0d57f2..706c5c375a01 100644
--- a/net/ipv6/udplite.c
+++ b/net/ipv6/udplite.c
@@ -109,13 +109,28 @@ static struct udp_seq_afinfo udplite6_seq_afinfo = {
109 .seq_fops = &udplite6_seq_fops, 109 .seq_fops = &udplite6_seq_fops,
110}; 110};
111 111
112static int udplite6_proc_init_net(struct net *net)
113{
114 return udp_proc_register(net, &udplite6_seq_afinfo);
115}
116
117static void udplite6_proc_exit_net(struct net *net)
118{
119 udp_proc_unregister(net, &udplite6_seq_afinfo);
120}
121
122static struct pernet_operations udplite6_net_ops = {
123 .init = udplite6_proc_init_net,
124 .exit = udplite6_proc_exit_net,
125};
126
112int __init udplite6_proc_init(void) 127int __init udplite6_proc_init(void)
113{ 128{
114 return udp_proc_register(&init_net, &udplite6_seq_afinfo); 129 return register_pernet_subsys(&udplite6_net_ops);
115} 130}
116 131
117void udplite6_proc_exit(void) 132void udplite6_proc_exit(void)
118{ 133{
119 udp_proc_unregister(&init_net, &udplite6_seq_afinfo); 134 unregister_pernet_subsys(&udplite6_net_ops);
120} 135}
121#endif 136#endif