aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_ipv4.c
diff options
context:
space:
mode:
authorDaniel Lezcano <dlezcano@fr.ibm.com>2008-03-21 07:14:45 -0400
committerDavid S. Miller <davem@davemloft.net>2008-03-21 07:14:45 -0400
commit6f8b13bcb3369a5df2e63acc422bed6098f5b8c4 (patch)
tree715d53b85e86b26c113b417e269602d1cb8ca436 /net/ipv4/tcp_ipv4.c
parent0c96d8c50bffb7f02690dd8a8cf1adb8e07e100f (diff)
[NETNS][IPV6] tcp6 - make proc per namespace
Make the proc for tcp6 to be per namespace. Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_ipv4.c')
-rw-r--r--net/ipv4/tcp_ipv4.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
index f9b30dc3bd6c..744bc9d6cebc 100644
--- a/net/ipv4/tcp_ipv4.c
+++ b/net/ipv4/tcp_ipv4.c
@@ -2253,7 +2253,7 @@ static int tcp_seq_release(struct inode *inode, struct file *file)
2253 return 0; 2253 return 0;
2254} 2254}
2255 2255
2256int tcp_proc_register(struct tcp_seq_afinfo *afinfo) 2256int tcp_proc_register(struct net *net, struct tcp_seq_afinfo *afinfo)
2257{ 2257{
2258 int rc = 0; 2258 int rc = 0;
2259 struct proc_dir_entry *p; 2259 struct proc_dir_entry *p;
@@ -2266,7 +2266,7 @@ int tcp_proc_register(struct tcp_seq_afinfo *afinfo)
2266 afinfo->seq_fops->llseek = seq_lseek; 2266 afinfo->seq_fops->llseek = seq_lseek;
2267 afinfo->seq_fops->release = tcp_seq_release; 2267 afinfo->seq_fops->release = tcp_seq_release;
2268 2268
2269 p = proc_net_fops_create(&init_net, afinfo->name, S_IRUGO, afinfo->seq_fops); 2269 p = proc_net_fops_create(net, afinfo->name, S_IRUGO, afinfo->seq_fops);
2270 if (p) 2270 if (p)
2271 p->data = afinfo; 2271 p->data = afinfo;
2272 else 2272 else
@@ -2274,11 +2274,11 @@ int tcp_proc_register(struct tcp_seq_afinfo *afinfo)
2274 return rc; 2274 return rc;
2275} 2275}
2276 2276
2277void tcp_proc_unregister(struct tcp_seq_afinfo *afinfo) 2277void tcp_proc_unregister(struct net *net, struct tcp_seq_afinfo *afinfo)
2278{ 2278{
2279 if (!afinfo) 2279 if (!afinfo)
2280 return; 2280 return;
2281 proc_net_remove(&init_net, afinfo->name); 2281 proc_net_remove(net, afinfo->name);
2282 memset(afinfo->seq_fops, 0, sizeof(*afinfo->seq_fops)); 2282 memset(afinfo->seq_fops, 0, sizeof(*afinfo->seq_fops));
2283} 2283}
2284 2284
@@ -2419,12 +2419,12 @@ static struct tcp_seq_afinfo tcp4_seq_afinfo = {
2419 2419
2420int __init tcp4_proc_init(void) 2420int __init tcp4_proc_init(void)
2421{ 2421{
2422 return tcp_proc_register(&tcp4_seq_afinfo); 2422 return tcp_proc_register(&init_net, &tcp4_seq_afinfo);
2423} 2423}
2424 2424
2425void tcp4_proc_exit(void) 2425void tcp4_proc_exit(void)
2426{ 2426{
2427 tcp_proc_unregister(&tcp4_seq_afinfo); 2427 tcp_proc_unregister(&init_net, &tcp4_seq_afinfo);
2428} 2428}
2429#endif /* CONFIG_PROC_FS */ 2429#endif /* CONFIG_PROC_FS */
2430 2430