diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/netfilter/x_tables.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/net/netfilter/x_tables.c b/net/netfilter/x_tables.c index 11b22abc2b70..5d75cd86ebb3 100644 --- a/net/netfilter/x_tables.c +++ b/net/netfilter/x_tables.c | |||
@@ -936,25 +936,24 @@ int xt_proto_init(struct net *net, int af) | |||
936 | #ifdef CONFIG_PROC_FS | 936 | #ifdef CONFIG_PROC_FS |
937 | strlcpy(buf, xt_prefix[af], sizeof(buf)); | 937 | strlcpy(buf, xt_prefix[af], sizeof(buf)); |
938 | strlcat(buf, FORMAT_TABLES, sizeof(buf)); | 938 | strlcat(buf, FORMAT_TABLES, sizeof(buf)); |
939 | proc = proc_net_fops_create(net, buf, 0440, &xt_table_ops); | 939 | proc = proc_create_data(buf, 0440, net->proc_net, &xt_table_ops, |
940 | (void *)(unsigned long)af); | ||
940 | if (!proc) | 941 | if (!proc) |
941 | goto out; | 942 | goto out; |
942 | proc->data = (void *)(unsigned long)af; | ||
943 | |||
944 | 943 | ||
945 | strlcpy(buf, xt_prefix[af], sizeof(buf)); | 944 | strlcpy(buf, xt_prefix[af], sizeof(buf)); |
946 | strlcat(buf, FORMAT_MATCHES, sizeof(buf)); | 945 | strlcat(buf, FORMAT_MATCHES, sizeof(buf)); |
947 | proc = proc_net_fops_create(net, buf, 0440, &xt_match_ops); | 946 | proc = proc_create_data(buf, 0440, net->proc_net, &xt_match_ops, |
947 | (void *)(unsigned long)af); | ||
948 | if (!proc) | 948 | if (!proc) |
949 | goto out_remove_tables; | 949 | goto out_remove_tables; |
950 | proc->data = (void *)(unsigned long)af; | ||
951 | 950 | ||
952 | strlcpy(buf, xt_prefix[af], sizeof(buf)); | 951 | strlcpy(buf, xt_prefix[af], sizeof(buf)); |
953 | strlcat(buf, FORMAT_TARGETS, sizeof(buf)); | 952 | strlcat(buf, FORMAT_TARGETS, sizeof(buf)); |
954 | proc = proc_net_fops_create(net, buf, 0440, &xt_target_ops); | 953 | proc = proc_create_data(buf, 0440, net->proc_net, &xt_target_ops, |
954 | (void *)(unsigned long)af); | ||
955 | if (!proc) | 955 | if (!proc) |
956 | goto out_remove_matches; | 956 | goto out_remove_matches; |
957 | proc->data = (void *)(unsigned long)af; | ||
958 | #endif | 957 | #endif |
959 | 958 | ||
960 | return 0; | 959 | return 0; |