diff options
author | Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com> | 2011-10-27 10:24:51 +0300 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2011-10-28 21:26:12 +0200 |
commit | d3f6815dd1935d44d96ee3847b9f0a41e8b87908 (patch) | |
tree | a91bbfbb3122e8ba52afdc325bd55c47a63e7b6f /tools | |
parent | 505c3fb154e1fd4b04305d688363b0280b4d58f1 (diff) | |
download | connman-d3f6815dd1935d44d96ee3847b9f0a41e8b87908.tar.gz connman-d3f6815dd1935d44d96ee3847b9f0a41e8b87908.tar.bz2 connman-d3f6815dd1935d44d96ee3847b9f0a41e8b87908.zip |
tools: Add x6_options matches handling to iptables-test
Diffstat (limited to 'tools')
-rw-r--r-- | tools/iptables-test.c | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/tools/iptables-test.c b/tools/iptables-test.c index 40ae0135..56598aad 100644 --- a/tools/iptables-test.c +++ b/tools/iptables-test.c @@ -1339,7 +1339,19 @@ static struct xtables_match *prepare_matches(struct connman_iptables *table, if (xt_m->init != NULL) xt_m->init(xt_m->m); - if (xt_m != xt_m->next) { + if (xt_m == xt_m->next) + goto done; + + if (xt_m->x6_options != NULL) + connman_iptables_globals.opts = + xtables_options_xfrm( +#if XTABLES_VERSION_CODE > 5 + connman_iptables_globals.orig_opts, +#endif + connman_iptables_globals.opts, + xt_m->x6_options, + &xt_m->option_offset); + else connman_iptables_globals.opts = xtables_merge_options( #if XTABLES_VERSION_CODE > 5 @@ -1349,12 +1361,12 @@ static struct xtables_match *prepare_matches(struct connman_iptables *table, xt_m->extra_opts, &xt_m->option_offset); - if (connman_iptables_globals.opts == NULL) { - g_free(xt_m->m); - xt_m = NULL; - } + if (connman_iptables_globals.opts == NULL) { + g_free(xt_m->m); + xt_m = NULL; } +done: return xt_m; } |