diff options
author | Jan Engelhardt <jengelh@medozas.de> | 2010-11-15 14:39:35 +0100 |
---|---|---|
committer | Jan Engelhardt <jengelh@medozas.de> | 2010-11-15 14:39:35 +0100 |
commit | 710a132ce9fbecedbf9447f2b2a134f2359a583c (patch) | |
tree | 4e4590c9449f9f3c272f1a8d18216b64f7d99b66 /iptables.c | |
parent | e84f131b5f992577119bd3679241f69ec394e0a7 (diff) |
Revert "Revert "libxtables: change option precedence order to be intuitive""
This reverts commit e84f131b5f992577119bd3679241f69ec394e0a7.
Solution follows.
Diffstat (limited to 'iptables.c')
-rw-r--r-- | iptables.c | 13 |
1 files changed, 9 insertions, 4 deletions
@@ -147,7 +147,6 @@ void iptables_exit_error(enum xtables_exittype status, const char *msg, ...) __a struct xtables_globals iptables_globals = { .option_offset = 0, .program_version = IPTABLES_VERSION, - .opts = original_opts, .orig_opts = original_opts, .exit_err = iptables_exit_error, }; @@ -1576,7 +1575,9 @@ int do_command(int argc, char *argv[], char **table, struct iptc_handle **handle target->t->u.user.revision = target->revision; if (target->init != NULL) target->init(target->t); - opts = xtables_merge_options(opts, + opts = xtables_merge_options( + iptables_globals.orig_opts, + opts, target->extra_opts, &target->option_offset); if (opts == NULL) @@ -1636,7 +1637,9 @@ int do_command(int argc, char *argv[], char **table, struct iptc_handle **handle m->init(m->m); if (m != m->next) { /* Merge options for non-cloned matches */ - opts = xtables_merge_options(opts, + opts = xtables_merge_options( + iptables_globals.orig_opts, + opts, m->extra_opts, &m->option_offset); if (opts == NULL) @@ -1790,7 +1793,9 @@ int do_command(int argc, char *argv[], char **table, struct iptc_handle **handle if (m->init != NULL) m->init(m->m); - opts = xtables_merge_options(opts, + opts = xtables_merge_options( + iptables_globals.orig_opts, + opts, m->extra_opts, &m->option_offset); if (opts == NULL) |