diff options
author | Jan Engelhardt <jengelh@medozas.de> | 2008-10-08 13:35:19 +0400 |
---|---|---|
committer | Patrick McHardy <kaber@trash.net> | 2008-10-08 13:35:19 +0400 |
commit | 6be3d8598e883fb632edf059ba2f8d1b9f4da138 (patch) | |
tree | ef8b3a40168b0f50079d05bd36b7b6f1c4fed9dd /net/ipv4 | |
parent | 9b4fce7a3508a9776534188b6065b206a9608ccf (diff) | |
download | linux-6be3d8598e883fb632edf059ba2f8d1b9f4da138.tar.xz |
netfilter: xtables: move extension arguments into compound structure (3/6)
This patch does this for match extensions' destroy functions.
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/netfilter/ip_tables.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/net/ipv4/netfilter/ip_tables.c b/net/ipv4/netfilter/ip_tables.c index 4147298a6a81..12ad4d5c55d6 100644 --- a/net/ipv4/netfilter/ip_tables.c +++ b/net/ipv4/netfilter/ip_tables.c @@ -576,12 +576,16 @@ mark_source_chains(struct xt_table_info *newinfo, static int cleanup_match(struct ipt_entry_match *m, unsigned int *i) { + struct xt_mtdtor_param par; + if (i && (*i)-- == 0) return 1; - if (m->u.kernel.match->destroy) - m->u.kernel.match->destroy(m->u.kernel.match, m->data); - module_put(m->u.kernel.match->me); + par.match = m->u.kernel.match; + par.matchinfo = m->data; + if (par.match->destroy != NULL) + par.match->destroy(&par); + module_put(par.match->me); return 0; } |