mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
netfilter: x_tables: pass xt_counters struct to counter allocator
Keeps some noise away from a followup patch. Signed-off-by: Florian Westphal <[email protected]> Acked-by: Eric Dumazet <[email protected]> Signed-off-by: Pablo Neira Ayuso <[email protected]>
This commit is contained in:
parent
4d31eef517
commit
f28e15bace
5 changed files with 34 additions and 38 deletions
|
|
@ -415,13 +415,10 @@ find_check_entry(struct arpt_entry *e, const char *name, unsigned int size)
|
|||
{
|
||||
struct xt_entry_target *t;
|
||||
struct xt_target *target;
|
||||
unsigned long pcnt;
|
||||
int ret;
|
||||
|
||||
pcnt = xt_percpu_counter_alloc();
|
||||
if (IS_ERR_VALUE(pcnt))
|
||||
if (!xt_percpu_counter_alloc(&e->counters))
|
||||
return -ENOMEM;
|
||||
e->counters.pcnt = pcnt;
|
||||
|
||||
t = arpt_get_target(e);
|
||||
target = xt_request_find_target(NFPROTO_ARP, t->u.user.name,
|
||||
|
|
|
|||
|
|
@ -539,12 +539,9 @@ find_check_entry(struct ipt_entry *e, struct net *net, const char *name,
|
|||
unsigned int j;
|
||||
struct xt_mtchk_param mtpar;
|
||||
struct xt_entry_match *ematch;
|
||||
unsigned long pcnt;
|
||||
|
||||
pcnt = xt_percpu_counter_alloc();
|
||||
if (IS_ERR_VALUE(pcnt))
|
||||
if (!xt_percpu_counter_alloc(&e->counters))
|
||||
return -ENOMEM;
|
||||
e->counters.pcnt = pcnt;
|
||||
|
||||
j = 0;
|
||||
mtpar.net = net;
|
||||
|
|
|
|||
Loading…
Reference in a new issue