netfilter: xtables: move extension arguments into compound structure (5/6)
This patch does this for target extensions' checkentry functions. Signed-off-by: Jan Engelhardt <jengelh@medozas.de> Signed-off-by: Patrick McHardy <kaber@trash.net>
This commit is contained in:
committed by
Patrick McHardy
parent
7eb3558655
commit
af5d6dc200
@ -40,6 +40,7 @@ static struct tcf_hashinfo ipt_hash_info = {
|
||||
|
||||
static int ipt_init_target(struct ipt_entry_target *t, char *table, unsigned int hook)
|
||||
{
|
||||
struct xt_tgchk_param par;
|
||||
struct xt_target *target;
|
||||
int ret = 0;
|
||||
|
||||
@ -49,9 +50,14 @@ static int ipt_init_target(struct ipt_entry_target *t, char *table, unsigned int
|
||||
return -ENOENT;
|
||||
|
||||
t->u.kernel.target = target;
|
||||
par.table = table;
|
||||
par.entryinfo = NULL;
|
||||
par.target = target;
|
||||
par.targinfo = t->data;
|
||||
par.hook_mask = hook;
|
||||
|
||||
ret = xt_check_target(target, AF_INET, t->u.target_size - sizeof(*t),
|
||||
table, hook, 0, 0, NULL, t->data);
|
||||
ret = xt_check_target(&par, NFPROTO_IPV4,
|
||||
t->u.target_size - sizeof(*t), 0, false);
|
||||
if (ret < 0) {
|
||||
module_put(t->u.kernel.target->me);
|
||||
return ret;
|
||||
|
Reference in New Issue
Block a user