diff options
-rw-r--r-- | src/iptables.c | 12 | ||||
-rw-r--r-- | tools/iptables-test.c | 12 |
2 files changed, 20 insertions, 4 deletions
diff --git a/src/iptables.c b/src/iptables.c index 8f8ab53c..e852e01c 100644 --- a/src/iptables.c +++ b/src/iptables.c @@ -1089,7 +1089,11 @@ static int iptables_command(int argc, char *argv[]) if (xt_t->init != NULL) xt_t->init(xt_t->t); iptables_globals.opts = - xtables_merge_options(iptables_globals.opts, + xtables_merge_options( +#if XTABLES_VERSION_CODE > 5 + iptables_globals.orig_opts, +#endif + iptables_globals.opts, xt_t->extra_opts, &xt_t->option_offset); if (iptables_globals.opts == NULL) @@ -1113,7 +1117,11 @@ static int iptables_command(int argc, char *argv[]) xt_m->init(xt_m->m); if (xt_m != xt_m->next) { iptables_globals.opts = - xtables_merge_options(iptables_globals.opts, + xtables_merge_options( +#if XTABLES_VERSION_CODE > 5 + iptables_globals.orig_opts, +#endif + iptables_globals.opts, xt_m->extra_opts, &xt_m->option_offset); if (iptables_globals.opts == NULL) diff --git a/tools/iptables-test.c b/tools/iptables-test.c index 298f23d5..bfe48031 100644 --- a/tools/iptables-test.c +++ b/tools/iptables-test.c @@ -1076,7 +1076,11 @@ int main(int argc, char *argv[]) if (xt_t->init != NULL) xt_t->init(xt_t->t); connman_iptables_globals.opts = - xtables_merge_options(connman_iptables_globals.opts, + xtables_merge_options( +#if XTABLES_VERSION_CODE > 5 + connman_iptables_globals.orig_opts, +#endif + connman_iptables_globals.opts, xt_t->extra_opts, &xt_t->option_offset); if (connman_iptables_globals.opts == NULL) @@ -1102,7 +1106,11 @@ int main(int argc, char *argv[]) xt_m->init(xt_m->m); if (xt_m != xt_m->next) { connman_iptables_globals.opts = - xtables_merge_options(connman_iptables_globals.opts, + xtables_merge_options( +#if XTABLES_VERSION_CODE > 5 + connman_iptables_globals.orig_opts, +#endif + connman_iptables_globals.opts, xt_m->extra_opts, &xt_m->option_offset); if (connman_iptables_globals.opts == NULL) |