diff options
author | Jan Engelhardt <jengelh@medozas.de> | 2008-10-08 05:35:17 -0400 |
---|---|---|
committer | Patrick McHardy <kaber@trash.net> | 2008-10-08 05:35:17 -0400 |
commit | 367c679007fa4f990eb7ee381326ec59d8148b0e (patch) | |
tree | a543f22332eba9ef972ed8ea6e66448921671ef7 /net/sched/act_ipt.c | |
parent | 147c3844ad381b58715a6ee2ea697594e3c06284 (diff) |
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 <jengelh@medozas.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'net/sched/act_ipt.c')
-rw-r--r-- | net/sched/act_ipt.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/net/sched/act_ipt.c b/net/sched/act_ipt.c index d1263b3c96c3..79ea19375caf 100644 --- a/net/sched/act_ipt.c +++ b/net/sched/act_ipt.c | |||
@@ -51,20 +51,12 @@ static int ipt_init_target(struct ipt_entry_target *t, char *table, unsigned int | |||
51 | t->u.kernel.target = target; | 51 | t->u.kernel.target = target; |
52 | 52 | ||
53 | ret = xt_check_target(target, AF_INET, t->u.target_size - sizeof(*t), | 53 | ret = xt_check_target(target, AF_INET, t->u.target_size - sizeof(*t), |
54 | table, hook, 0, 0); | 54 | table, hook, 0, 0, NULL, t->data); |
55 | if (ret) { | 55 | if (ret < 0) { |
56 | module_put(t->u.kernel.target->me); | 56 | module_put(t->u.kernel.target->me); |
57 | return ret; | 57 | return ret; |
58 | } | 58 | } |
59 | if (t->u.kernel.target->checkentry | 59 | return 0; |
60 | && !t->u.kernel.target->checkentry(table, NULL, | ||
61 | t->u.kernel.target, t->data, | ||
62 | hook)) { | ||
63 | module_put(t->u.kernel.target->me); | ||
64 | ret = -EINVAL; | ||
65 | } | ||
66 | |||
67 | return ret; | ||
68 | } | 60 | } |
69 | 61 | ||
70 | static void ipt_destroy_target(struct ipt_entry_target *t) | 62 | static void ipt_destroy_target(struct ipt_entry_target *t) |