mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
netfilter: xtables: do centralized checkentry call (1/2)
It used to be that {ip,ip6,etc}_tables called extension->checkentry
themselves, but this can be moved into the xtables core.
Signed-off-by: Jan Engelhardt <[email protected]>
Signed-off-by: Patrick McHardy <[email protected]>
This commit is contained in:
parent
147c3844ad
commit
367c679007
7 changed files with 45 additions and 67 deletions
|
|
@ -51,20 +51,12 @@ static int ipt_init_target(struct ipt_entry_target *t, char *table, unsigned int
|
|||
t->u.kernel.target = target;
|
||||
|
||||
ret = xt_check_target(target, AF_INET, t->u.target_size - sizeof(*t),
|
||||
table, hook, 0, 0);
|
||||
if (ret) {
|
||||
table, hook, 0, 0, NULL, t->data);
|
||||
if (ret < 0) {
|
||||
module_put(t->u.kernel.target->me);
|
||||
return ret;
|
||||
}
|
||||
if (t->u.kernel.target->checkentry
|
||||
&& !t->u.kernel.target->checkentry(table, NULL,
|
||||
t->u.kernel.target, t->data,
|
||||
hook)) {
|
||||
module_put(t->u.kernel.target->me);
|
||||
ret = -EINVAL;
|
||||
}
|
||||
|
||||
return ret;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void ipt_destroy_target(struct ipt_entry_target *t)
|
||||
|
|
|
|||
Loading…
Reference in a new issue