diff options
author | Jan Engelhardt <jengelh@medozas.de> | 2011-02-10 16:57:37 +0100 |
---|---|---|
committer | Jan Engelhardt <jengelh@medozas.de> | 2011-04-06 12:54:22 +0200 |
commit | 3af739b0e7c3b6dcc986645c57c982d0add5006b (patch) | |
tree | cc77bbebbe47e2f6162549dc59e96513701f708b /iptables.c | |
parent | 9c5c10554c61f0b22cbc65b27b765fa8172040f7 (diff) |
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 <jengelh@medozas.de>
Diffstat (limited to 'iptables.c')
-rw-r--r-- | iptables.c | 18 |
1 files changed, 4 insertions, 14 deletions
@@ -1816,20 +1816,10 @@ int do_command(int argc, char *argv[], char **table, struct iptc_handle **handle "\nThe \"nat\" table is not intended for filtering, " "the use of DROP is therefore inhibited.\n\n"); - 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 */ |