netfilter: x_tables: introduce and use xt_copy_counters_from_user
authorFlorian Westphal <fw@strlen.de>
Fri, 1 Apr 2016 13:37:59 +0000 (15:37 +0200)
committerSasha Levin <sasha.levin@oracle.com>
Mon, 11 Jul 2016 03:07:37 +0000 (23:07 -0400)
commitb7aa372fec2c1d4a1fcf4398ae88ba94134b9522
treeae6c08d84a0155819fe4745abc9324ce2f1c9c58
parentaf815d264b7ed1cdceb0e1fdf4fa7d3bd5fe9a99
netfilter: x_tables: introduce and use xt_copy_counters_from_user

[ Upstream commit d7591f0c41ce3e67600a982bab6989ef0f07b3ce ]

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: Sasha Levin <sasha.levin@oracle.com>
include/linux/netfilter/x_tables.h
net/ipv4/netfilter/arp_tables.c
net/ipv4/netfilter/ip_tables.c
net/ipv6/netfilter/ip6_tables.c
net/netfilter/x_tables.c