aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2012-04-19 09:43:55 -0400
committerDavid S. Miller <davem@davemloft.net>2012-04-20 21:22:30 -0400
commitf99e8f715a5c7ebad5410b1e9b4d744ddb284f54 (patch)
tree82c244a36233aeca19284caa308ca094b88ecade /net
parent8607ddb86711df4504a028cc88299d334b786bf3 (diff)
net: Convert nf_conntrack_proto to use register_net_sysctl
There isn't much advantage here except that strings paths are a bit easier to read, and converting everything to them allows me to kill off ctl_path. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Acked-by: Pavel Emelyanov <xemul@parallels.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c2
-rw-r--r--net/netfilter/nf_conntrack_proto.c8
2 files changed, 5 insertions, 5 deletions
diff --git a/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c b/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c
index 345c7dc08482..91747d4ebc26 100644
--- a/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c
+++ b/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c
@@ -365,7 +365,7 @@ struct nf_conntrack_l3proto nf_conntrack_l3proto_ipv4 __read_mostly = {
365 .nla_policy = ipv4_nla_policy, 365 .nla_policy = ipv4_nla_policy,
366#endif 366#endif
367#if defined(CONFIG_SYSCTL) && defined(CONFIG_NF_CONNTRACK_PROC_COMPAT) 367#if defined(CONFIG_SYSCTL) && defined(CONFIG_NF_CONNTRACK_PROC_COMPAT)
368 .ctl_table_path = nf_net_ipv4_netfilter_sysctl_path, 368 .ctl_table_path = "net/ipv4/netfilter",
369 .ctl_table = ip_ct_sysctl_table, 369 .ctl_table = ip_ct_sysctl_table,
370#endif 370#endif
371 .me = THIS_MODULE, 371 .me = THIS_MODULE,
diff --git a/net/netfilter/nf_conntrack_proto.c b/net/netfilter/nf_conntrack_proto.c
index bbc753fd4fe0..8b631b07a645 100644
--- a/net/netfilter/nf_conntrack_proto.c
+++ b/net/netfilter/nf_conntrack_proto.c
@@ -36,11 +36,11 @@ static DEFINE_MUTEX(nf_ct_proto_mutex);
36 36
37#ifdef CONFIG_SYSCTL 37#ifdef CONFIG_SYSCTL
38static int 38static int
39nf_ct_register_sysctl(struct ctl_table_header **header, struct ctl_path *path, 39nf_ct_register_sysctl(struct ctl_table_header **header, const char *path,
40 struct ctl_table *table, unsigned int *users) 40 struct ctl_table *table, unsigned int *users)
41{ 41{
42 if (*header == NULL) { 42 if (*header == NULL) {
43 *header = register_net_sysctl_table(&init_net, path, table); 43 *header = register_net_sysctl(&init_net, path, table);
44 if (*header == NULL) 44 if (*header == NULL)
45 return -ENOMEM; 45 return -ENOMEM;
46 } 46 }
@@ -250,7 +250,7 @@ static int nf_ct_l4proto_register_sysctl(struct nf_conntrack_l4proto *l4proto)
250#ifdef CONFIG_SYSCTL 250#ifdef CONFIG_SYSCTL
251 if (l4proto->ctl_table != NULL) { 251 if (l4proto->ctl_table != NULL) {
252 err = nf_ct_register_sysctl(l4proto->ctl_table_header, 252 err = nf_ct_register_sysctl(l4proto->ctl_table_header,
253 nf_net_netfilter_sysctl_path, 253 "net/netfilter",
254 l4proto->ctl_table, 254 l4proto->ctl_table,
255 l4proto->ctl_table_users); 255 l4proto->ctl_table_users);
256 if (err < 0) 256 if (err < 0)
@@ -259,7 +259,7 @@ static int nf_ct_l4proto_register_sysctl(struct nf_conntrack_l4proto *l4proto)
259#ifdef CONFIG_NF_CONNTRACK_PROC_COMPAT 259#ifdef CONFIG_NF_CONNTRACK_PROC_COMPAT
260 if (l4proto->ctl_compat_table != NULL) { 260 if (l4proto->ctl_compat_table != NULL) {
261 err = nf_ct_register_sysctl(&l4proto->ctl_compat_table_header, 261 err = nf_ct_register_sysctl(&l4proto->ctl_compat_table_header,
262 nf_net_ipv4_netfilter_sysctl_path, 262 "net/ipv4/netfilter",
263 l4proto->ctl_compat_table, NULL); 263 l4proto->ctl_compat_table, NULL);
264 if (err == 0) 264 if (err == 0)
265 goto out; 265 goto out;