aboutsummaryrefslogtreecommitdiffstats
path: root/net/bridge
diff options
context:
space:
mode:
authorJan Engelhardt <jengelh@medozas.de>2008-10-08 05:35:19 -0400
committerPatrick McHardy <kaber@trash.net>2008-10-08 05:35:19 -0400
commit6be3d8598e883fb632edf059ba2f8d1b9f4da138 (patch)
treeef8b3a40168b0f50079d05bd36b7b6f1c4fed9dd /net/bridge
parent9b4fce7a3508a9776534188b6065b206a9608ccf (diff)
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 5ce37b2f5b84..0320b5203624 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,
558static inline int 558static inline int
559ebt_cleanup_match(struct ebt_entry_match *m, unsigned int *i) 559ebt_cleanup_match(struct ebt_entry_match *m, unsigned int *i)
560{ 560{
561 struct xt_mtdtor_param par;
562
561 if (i && (*i)-- == 0) 563 if (i && (*i)-- == 0)
562 return 1; 564 return 1;
563 if (m->u.match->destroy)
564 m->u.match->destroy(m->u.match, m->data);
565 module_put(m->u.match->me);
566 565
566 par.match = m->u.match;
567 par.matchinfo = m->data;
568 if (par.match->destroy != NULL)
569 par.match->destroy(&par);
570 module_put(par.match->me);
567 return 0; 571 return 0;
568} 572}
569 573
@@ -609,7 +613,7 @@ ebt_check_entry(struct ebt_entry *e, struct ebt_table_info *newinfo,
609 unsigned int i, j, hook = 0, hookmask = 0; 613 unsigned int i, j, hook = 0, hookmask = 0;
610 size_t gap; 614 size_t gap;
611 int ret; 615 int ret;
612 struct xt_mtchk_param par; 616 struct xt_mtchk_param mtpar;
613 617
614 /* don't mess with the struct ebt_entries */ 618 /* don't mess with the struct ebt_entries */
615 if (e->bitmask == 0) 619 if (e->bitmask == 0)
@@ -651,10 +655,10 @@ ebt_check_entry(struct ebt_entry *e, struct ebt_table_info *newinfo,
651 } 655 }
652 i = 0; 656 i = 0;
653 657
654 par.table = name; 658 mtpar.table = name;
655 par.entryinfo = e; 659 mtpar.entryinfo = e;
656 par.hook_mask = hookmask; 660 mtpar.hook_mask = hookmask;
657 ret = EBT_MATCH_ITERATE(e, ebt_check_match, &par, &i); 661 ret = EBT_MATCH_ITERATE(e, ebt_check_match, &mtpar, &i);
658 if (ret != 0) 662 if (ret != 0)
659 goto cleanup_matches; 663 goto cleanup_matches;
660 j = 0; 664 j = 0;