diff options
author | Florian Westphal <fw@strlen.de> | 2016-04-01 15:37:59 +0200 |
---|---|---|
committer | Willy Tarreau <w@1wt.eu> | 2016-08-21 23:22:32 +0200 |
commit | 0a0523382f1a1e95799311648f0267177d752ea4 (patch) | |
tree | 00872fadf0bf9ba2cec05a1be15c38e1e25f594d /include | |
parent | eb4a7d671bb54008039dfd99bc45a39e4f73a516 (diff) | |
download | lwn-0a0523382f1a1e95799311648f0267177d752ea4.tar.gz lwn-0a0523382f1a1e95799311648f0267177d752ea4.zip |
netfilter: x_tables: introduce and use xt_copy_counters_from_user
commit 63ecb81aadf1c823c85c70a2bfd1ec9df3341a72 upstream.
commit d7591f0c41ce3e67600a982bab6989ef0f07b3ce upstream
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Willy Tarreau <w@1wt.eu>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/netfilter/x_tables.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/netfilter/x_tables.h b/include/linux/netfilter/x_tables.h index 9f0d2b52b976..547a5846e6ac 100644 --- a/include/linux/netfilter/x_tables.h +++ b/include/linux/netfilter/x_tables.h @@ -248,6 +248,9 @@ extern int xt_check_match(struct xt_mtchk_param *, extern 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); + extern struct xt_table *xt_register_table(struct net *net, const struct xt_table *table, struct xt_table_info *bootstrap, |