summaryrefslogtreecommitdiff
path: root/net/bridge
diff options
context:
space:
mode:
authorJan Engelhardt <jengelh@medozas.de>2008-10-08 11:35:19 +0200
committerPatrick McHardy <kaber@trash.net>2008-10-08 11:35:19 +0200
commit6be3d8598e883fb632edf059ba2f8d1b9f4da138 (patch)
treeef8b3a40168b0f50079d05bd36b7b6f1c4fed9dd /net/bridge
parent9b4fce7a3508a9776534188b6065b206a9608ccf (diff)
downloadlinux-3.10-6be3d8598e883fb632edf059ba2f8d1b9f4da138.tar.gz
linux-3.10-6be3d8598e883fb632edf059ba2f8d1b9f4da138.tar.bz2
linux-3.10-6be3d8598e883fb632edf059ba2f8d1b9f4da138.zip
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/bridge')
-rw-r--r--net/bridge/netfilter/ebtables.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/net/bridge/netfilter/ebtables.c b/net/bridge/netfilter/ebtables.c
index 5ce37b2f5b8..0320b520362 100644
--- a/net/bridge/netfilter/ebtables.c
+++ b/net/bridge/netfilter/ebtables.c
@@ -558,12 +558,16 @@ ebt_get_udc_positions(struct ebt_entry *e, struct ebt_table_info *newinfo,
static inline int
ebt_cleanup_match(struct ebt_entry_match *m, unsigned int *i)
{
+ struct xt_mtdtor_param par;
+
if (i && (*i)-- == 0)
return 1;
- if (m->u.match->destroy)
- m->u.match->destroy(m->u.match, m->data);
- module_put(m->u.match->me);
+ par.match = m->u.match;
+ par.matchinfo = m->data;
+ if (par.match->destroy != NULL)
+ par.match->destroy(&par);
+ module_put(par.match->me);
return 0;
}
@@ -609,7 +613,7 @@ ebt_check_entry(struct ebt_entry *e, struct ebt_table_info *newinfo,
unsigned int i, j, hook = 0, hookmask = 0;
size_t gap;
int ret;
- struct xt_mtchk_param par;
+ struct xt_mtchk_param mtpar;
/* don't mess with the struct ebt_entries */
if (e->bitmask == 0)
@@ -651,10 +655,10 @@ ebt_check_entry(struct ebt_entry *e, struct ebt_table_info *newinfo,
}
i = 0;
- par.table = name;
- par.entryinfo = e;
- par.hook_mask = hookmask;
- ret = EBT_MATCH_ITERATE(e, ebt_check_match, &par, &i);
+ mtpar.table = name;
+ mtpar.entryinfo = e;
+ mtpar.hook_mask = hookmask;
+ ret = EBT_MATCH_ITERATE(e, ebt_check_match, &mtpar, &i);
if (ret != 0)
goto cleanup_matches;
j = 0;