diff options
author | Pavel Emelyanov <xemul@openvz.org> | 2008-03-24 17:56:57 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-03-24 17:56:57 -0400 |
commit | 84c375af0ff61e0bd15fac0aed0438640494483e (patch) | |
tree | 04df8259aef29b1d7eebd4e98988cf5e995527b9 /net/ipv4/udplite.c | |
parent | ff2bac6a63e3694e7a97152b7e934fe244e2a858 (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/ipv4/udplite.c')
-rw-r--r-- | net/ipv4/udplite.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/net/ipv4/udplite.c b/net/ipv4/udplite.c index 653a6fc19023..ddf4cc432796 100644 --- a/net/ipv4/udplite.c +++ b/net/ipv4/udplite.c | |||
@@ -83,9 +83,24 @@ static struct udp_seq_afinfo udplite4_seq_afinfo = { | |||
83 | .seq_fops = &udplite4_seq_fops, | 83 | .seq_fops = &udplite4_seq_fops, |
84 | }; | 84 | }; |
85 | 85 | ||
86 | static int udplite4_proc_init_net(struct net *net) | ||
87 | { | ||
88 | return udp_proc_register(net, &udplite4_seq_afinfo); | ||
89 | } | ||
90 | |||
91 | static void udplite4_proc_exit_net(struct net *net) | ||
92 | { | ||
93 | udp_proc_unregister(net, &udplite4_seq_afinfo); | ||
94 | } | ||
95 | |||
96 | static struct pernet_operations udplite4_net_ops = { | ||
97 | .init = udplite4_proc_init_net, | ||
98 | .exit = udplite4_proc_exit_net, | ||
99 | }; | ||
100 | |||
86 | static __init int udplite4_proc_init(void) | 101 | static __init int udplite4_proc_init(void) |
87 | { | 102 | { |
88 | return udp_proc_register(&init_net, &udplite4_seq_afinfo); | 103 | return register_pernet_subsys(&udplite4_net_ops); |
89 | } | 104 | } |
90 | #else | 105 | #else |
91 | static inline int udplite4_proc_init(void) | 106 | static inline int udplite4_proc_init(void) |