Send connman mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.01.org/mailman/listinfo/connman
or, via email, send a message with subject or body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of connman digest..."
Today's Topics:
1. [PATCH] Add the missing function item of xtables to match
iptables 1.6 (Wu Zheng)
----------------------------------------------------------------------
Message: 1
Date: Wed, 27 Jan 2016 18:02:20 +0800
From: Wu Zheng <[email protected]>
To: [email protected]
Subject: [PATCH] Add the missing function item of xtables to match
iptables 1.6
Message-ID: <[email protected]>
The struct of xtables_globals has been modified in iptables 1.6.
If connman runs with iptables 1.6, it can crash.
Program received signal SIGSEGV, Segmentation fault.
0x00000000 in ?? ()
0xb7dea89c in xtables_find_target () from /usr/lib/libxtables.so.11
0xb7deac1c in ?? () from /usr/lib/libxtables.so.11
0xb7dea793 in xtables_find_target () from /usr/lib/libxtables.so.11
The the missing function item of xtables is added to xtables_globals.
It can fix the above issue.
---
configure.ac | 6 ++++++
src/iptables.c | 3 +++
2 files changed, 9 insertions(+)
diff --git a/configure.ac b/configure.ac
index 9a5a70e..f801a2c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -270,6 +270,12 @@ PKG_CHECK_MODULES(XTABLES, xtables >= 1.4.11, dummy=yes,
AC_SUBST(XTABLES_CFLAGS)
AC_SUBST(XTABLES_LIBS)
+PKG_CHECK_MODULES(XTABLES, xtables >= 1.6.0, xtables_compat=1,
+ xtables_compat=0)
+if test "$xtables_compat" -ne 0; then
+ XTABLES_CFLAGS="-DXTCOMPAT"
+fi
+
AC_ARG_ENABLE(test, AC_HELP_STRING([--enable-test],
[enable test/example scripts]), [enable_test=${enableval}])
AM_CONDITIONAL(TEST, test "${enable_test}" = "yes")
diff --git a/src/iptables.c b/src/iptables.c
index fa2f05b..0ac1a9a 100644
--- a/src/iptables.c
+++ b/src/iptables.c
@@ -1566,6 +1566,9 @@ struct xtables_globals iptables_globals = {
.option_offset = 0,
.opts = iptables_opts,
.orig_opts = iptables_opts,
+#ifdef XTCOMPAT
+ .compat_rev = xtables_compatible_revision,
+#endif
};
static struct xtables_target *prepare_target(struct connman_iptables *table,
--
2.1.4
------------------------------
Subject: Digest Footer
_______________________________________________
connman mailing list
[email protected]
https://lists.01.org/mailman/listinfo/connman
------------------------------
End of connman Digest, Vol 3, Issue 20
**************************************