diff options
-rw-r--r-- | net/ipv4/udplite.c | 17 | ||||
-rw-r--r-- | net/ipv6/udplite.c | 19 |
2 files changed, 33 insertions, 3 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) |
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 | ||
112 | static int udplite6_proc_init_net(struct net *net) | ||
113 | { | ||
114 | return udp_proc_register(net, &udplite6_seq_afinfo); | ||
115 | } | ||
116 | |||
117 | static void udplite6_proc_exit_net(struct net *net) | ||
118 | { | ||
119 | udp_proc_unregister(net, &udplite6_seq_afinfo); | ||
120 | } | ||
121 | |||
122 | static struct pernet_operations udplite6_net_ops = { | ||
123 | .init = udplite6_proc_init_net, | ||
124 | .exit = udplite6_proc_exit_net, | ||
125 | }; | ||
126 | |||
112 | int __init udplite6_proc_init(void) | 127 | int __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 | ||
117 | void udplite6_proc_exit(void) | 132 | void 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 |