diff options
| author | Jan Engelhardt <jengelh@medozas.de> | 2008-10-08 05:35:19 -0400 |
|---|---|---|
| committer | Patrick McHardy <kaber@trash.net> | 2008-10-08 05:35:19 -0400 |
| commit | a2df1648ba615dd5908e9a1fa7b2f133fa302487 (patch) | |
| tree | a70a2424cc660903fbcb8120344d80e62df4b0c4 /net/ipv6 | |
| parent | af5d6dc200eb0fcc6fbd3df1ab4d8969004cb37f (diff) | |
netfilter: xtables: move extension arguments into compound structure (6/6)
This patch does this for target extensions' destroy functions.
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'net/ipv6')
| -rw-r--r-- | net/ipv6/netfilter/ip6_tables.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/net/ipv6/netfilter/ip6_tables.c b/net/ipv6/netfilter/ip6_tables.c index ca14fb8bd362..d934a6994632 100644 --- a/net/ipv6/netfilter/ip6_tables.c +++ b/net/ipv6/netfilter/ip6_tables.c | |||
| @@ -793,6 +793,7 @@ check_entry_size_and_hooks(struct ip6t_entry *e, | |||
| 793 | static int | 793 | static int |
| 794 | cleanup_entry(struct ip6t_entry *e, unsigned int *i) | 794 | cleanup_entry(struct ip6t_entry *e, unsigned int *i) |
| 795 | { | 795 | { |
| 796 | struct xt_tgdtor_param par; | ||
| 796 | struct ip6t_entry_target *t; | 797 | struct ip6t_entry_target *t; |
| 797 | 798 | ||
| 798 | if (i && (*i)-- == 0) | 799 | if (i && (*i)-- == 0) |
| @@ -801,9 +802,12 @@ cleanup_entry(struct ip6t_entry *e, unsigned int *i) | |||
| 801 | /* Cleanup all matches */ | 802 | /* Cleanup all matches */ |
| 802 | IP6T_MATCH_ITERATE(e, cleanup_match, NULL); | 803 | IP6T_MATCH_ITERATE(e, cleanup_match, NULL); |
| 803 | t = ip6t_get_target(e); | 804 | t = ip6t_get_target(e); |
| 804 | if (t->u.kernel.target->destroy) | 805 | |
| 805 | t->u.kernel.target->destroy(t->u.kernel.target, t->data); | 806 | par.target = t->u.kernel.target; |
| 806 | module_put(t->u.kernel.target->me); | 807 | par.targinfo = t->data; |
| 808 | if (par.target->destroy != NULL) | ||
| 809 | par.target->destroy(&par); | ||
| 810 | module_put(par.target->me); | ||
| 807 | return 0; | 811 | return 0; |
| 808 | } | 812 | } |
| 809 | 813 | ||
