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
commita2df1648ba615dd5908e9a1fa7b2f133fa302487 (patch)
treea70a2424cc660903fbcb8120344d80e62df4b0c4 /net/bridge
parentaf5d6dc200eb0fcc6fbd3df1ab4d8969004cb37f (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/bridge')
-rw-r--r--net/bridge/netfilter/ebtables.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/net/bridge/netfilter/ebtables.c b/net/bridge/netfilter/ebtables.c
index cf823c21c166..29d8061fa153 100644
--- a/net/bridge/netfilter/ebtables.c
+++ b/net/bridge/netfilter/ebtables.c
@@ -581,18 +581,23 @@ ebt_cleanup_match(struct ebt_entry_match *m, unsigned int *i)
581static inline int 581static inline int
582ebt_cleanup_watcher(struct ebt_entry_watcher *w, unsigned int *i) 582ebt_cleanup_watcher(struct ebt_entry_watcher *w, unsigned int *i)
583{ 583{
584 struct xt_tgdtor_param par;
585
584 if (i && (*i)-- == 0) 586 if (i && (*i)-- == 0)
585 return 1; 587 return 1;
586 if (w->u.watcher->destroy)
587 w->u.watcher->destroy(w->u.watcher, w->data);
588 module_put(w->u.watcher->me);
589 588
589 par.target = w->u.watcher;
590 par.targinfo = w->data;
591 if (par.target->destroy != NULL)
592 par.target->destroy(&par);
593 module_put(par.target->me);
590 return 0; 594 return 0;
591} 595}
592 596
593static inline int 597static inline int
594ebt_cleanup_entry(struct ebt_entry *e, unsigned int *cnt) 598ebt_cleanup_entry(struct ebt_entry *e, unsigned int *cnt)
595{ 599{
600 struct xt_tgdtor_param par;
596 struct ebt_entry_target *t; 601 struct ebt_entry_target *t;
597 602
598 if (e->bitmask == 0) 603 if (e->bitmask == 0)
@@ -603,10 +608,12 @@ ebt_cleanup_entry(struct ebt_entry *e, unsigned int *cnt)
603 EBT_WATCHER_ITERATE(e, ebt_cleanup_watcher, NULL); 608 EBT_WATCHER_ITERATE(e, ebt_cleanup_watcher, NULL);
604 EBT_MATCH_ITERATE(e, ebt_cleanup_match, NULL); 609 EBT_MATCH_ITERATE(e, ebt_cleanup_match, NULL);
605 t = (struct ebt_entry_target *)(((char *)e) + e->target_offset); 610 t = (struct ebt_entry_target *)(((char *)e) + e->target_offset);
606 if (t->u.target->destroy)
607 t->u.target->destroy(t->u.target, t->data);
608 module_put(t->u.target->me);
609 611
612 par.target = t->u.target;
613 par.targinfo = t->data;
614 if (par.target->destroy != NULL)
615 par.target->destroy(&par);
616 module_put(par.target->me);
610 return 0; 617 return 0;
611} 618}
612 619