summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorStefan Schmidt <stefan@datenfreihafen.org>2011-07-20 16:46:06 +0200
committerMarcel Holtmann <marcel@holtmann.org>2011-07-21 11:34:09 +0200
commitfd6684752ff6f59de47e07dd850d5e3366f3ef3d (patch)
treec190165ee8845a679067b9d523e273ef3ef5e6ca /tools
parent0ef53353b51b2e1f35d0ab70e594c9197b1a7746 (diff)
downloadconnman-fd6684752ff6f59de47e07dd850d5e3366f3ef3d.tar.gz
connman-fd6684752ff6f59de47e07dd850d5e3366f3ef3d.tar.bz2
connman-fd6684752ff6f59de47e07dd850d5e3366f3ef3d.zip
iptables: Work around API breakage introduced in iptables 1.4.11
The xtables_merge_options() paramter list got extended without version bump. These clumsy #ifdef's make it possible to work with newer and older iptables libraries. It got inspired from an iproute2 patch: https://bugs.gentoo.org/attachment.cgi?id=276401 Once all distributions start to carry 1.4.11 it can be considered to bump the minimum version for connman and remove these ifdef's.
Diffstat (limited to 'tools')
-rw-r--r--tools/iptables-test.c12
1 files changed, 10 insertions, 2 deletions
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)