aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/netfilter
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2016-04-01 15:37:59 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2016-04-14 00:30:41 +0200
commitd7591f0c41ce3e67600a982bab6989ef0f07b3ce (patch)
tree54d520c0e6f35befce9b424d4cc8a518fe31f0ad /include/linux/netfilter
parentnetfilter: x_tables: remove obsolete check (diff)
downloadlinux-dev-d7591f0c41ce3e67600a982bab6989ef0f07b3ce.tar.xz
linux-dev-d7591f0c41ce3e67600a982bab6989ef0f07b3ce.zip
netfilter: x_tables: introduce and use xt_copy_counters_from_user
The three variants use same copy&pasted code, condense this into a helper and use that. Make sure info.name is 0-terminated. Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/linux/netfilter')
-rw-r--r--include/linux/netfilter/x_tables.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/netfilter/x_tables.h b/include/linux/netfilter/x_tables.h
index e2da9b90f1b8..4dd9306c9d56 100644
--- a/include/linux/netfilter/x_tables.h
+++ b/include/linux/netfilter/x_tables.h
@@ -251,6 +251,9 @@ int xt_check_match(struct xt_mtchk_param *, unsigned int size, u_int8_t proto,
int xt_check_target(struct xt_tgchk_param *, unsigned int size, u_int8_t proto,
bool inv_proto);
+void *xt_copy_counters_from_user(const void __user *user, unsigned int len,
+ struct xt_counters_info *info, bool compat);
+
struct xt_table *xt_register_table(struct net *net,
const struct xt_table *table,
struct xt_table_info *bootstrap,