From 3af739b0e7c3b6dcc986645c57c982d0add5006b Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Thu, 10 Feb 2011 16:57:37 +0100 Subject: libxtables: provide better final_check This passes the per-extension data block to the new x6_fcheck function pointer, which can then do last alterations without using hacks like global variables (think libxt_statistic). Signed-off-by: Jan Engelhardt --- ip6tables.c | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) (limited to 'ip6tables.c') diff --git a/ip6tables.c b/ip6tables.c index 83d2fae1..3beeddf6 100644 --- a/ip6tables.c +++ b/ip6tables.c @@ -1782,20 +1782,10 @@ int do_command6(int argc, char *argv[], char **table, struct ip6tc_handle **hand cs.invert = FALSE; } - for (matchp = cs.matches; matchp; matchp = matchp->next) { - if (matchp->match->x6_options != NULL) - xtables_options_fcheck(matchp->match->name, - matchp->match->mflags, - matchp->match->x6_options); - if (matchp->match->final_check != NULL) - matchp->match->final_check(matchp->match->mflags); - } - - if (cs.target != NULL && cs.target->x6_options != NULL) - xtables_options_fcheck(cs.target->name, cs.target->tflags, - cs.target->x6_options); - if (cs.target != NULL && cs.target->final_check != NULL) - cs.target->final_check(cs.target->tflags); + for (matchp = cs.matches; matchp; matchp = matchp->next) + xtables_option_mfcall(matchp->match); + if (cs.target != NULL) + xtables_option_tfcall(cs.target); /* Fix me: must put inverse options checking here --MN */ -- cgit v1.2.3