package/connman: fix crash due to iptables 1.6.0 update
PATCH v2 1/1 package/connman: fix crash due to iptables 1.6.0 update
iptables was updated to version 1.6.0 in commit
https://git.busybox.net/buildroot/commit/?id=35dc775 however, connman 1.31 crashes when iptables 1.6.0 is used.
This issues has already been fixed upstream but is not currently available in a release. To fix connman include the upstream patch. See
http://git.kernel.org/cgit/network/connman/connman.git/commit/?id=acea08a
---
Changes v1 -> v2
- Added Signed-off-by to patch (suggested by Thomas)
--- ...ion-item-of-xtables-to-match-iptables-1.6.patch | 38 ++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 package/connman/0002-iptables-Add-missing-function-item-of-xtables-to-match-iptables-1.6.patch
package/connman/0002-iptables-Add-missing-function-item-of-xtables-to-match-iptables-1.6.patch new file +38 -0
@@ -0,0 +1,38 @@ +From acea08a0e4234a4c1a87bedc087c73ff36de0c7b Mon Sep 17 00:00:00 2001 +From: Wu Zheng <[email protected]> +Date: Thu, 28 Jan 2016 18:04:17 +0800 +Subject: iptables: Add missing function item of xtables to match iptables 1.6 + +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. + +Signed-off-by: Martin Bark <[email protected]> +--- + src/iptables.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/src/iptables.c b/src/iptables.c +index bc0c763..5ef757a 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, ++#if XTABLES_VERSION_CODE > 10 ++ .compat_rev = xtables_compatible_revision, ++#endif + }; + + static struct xtables_target *prepare_target(struct connman_iptables *table, +-- +cgit v0.12 +
Signature · 1 line
2.7.2
Thomas Petazzoni
AppliedPATCH v2 1/1 package/connman: fix crash due to iptables 1.6.0 update
Dear Martin Bark,
Quoted 11 lines · Martin Bark
iptables was updated to version 1.6.0 in commit
https://git.busybox.net/buildroot/commit/?id=35dc775 however, connman 1.31 crashes when iptables 1.6.0 is used.This issues has already been fixed upstream but is not currently available in a release. To fix connman include the upstream patch. See
http://git.kernel.org/cgit/network/connman/connman.git/commit/?id=acea08aSigned-off-by Martin Bark <[email protected]>---
Applied to master, thanks. Since you already contributed this patch to connman, could you also submit upstream the patch package/connman/0001-configure-check-for-execinfo.h.patch ?
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH v2 1/1 package/connman: fix crash due to iptables 1.6.0 update
Thomas,
Quoted 11 lines · Thomas Petazzoni
Dear Martin Bark,
Quoted 8 lines · Martin Bark
iptables was updated to version 1.6.0 in commit
https://git.busybox.net/buildroot/commit/?id=35dc775 however, connman 1.31 crashes when iptables 1.6.0 is used.This issues has already been fixed upstream but is not currently available in a release. To fix connman include the upstream patch. See
http://git.kernel.org/cgit/network/connman/connman.git/commit/?id=acea08a
Quoted 7 lines
Quoted 3 lines
Signed-off-by Martin Bark <[email protected]>---
Applied to master, thanks. Since you already contributed this patch to connman, could you also submit upstream the patch
package/connman/0001-configure-check-for-execinfo.h.patch?
Yes I'm happy to can do that.
Just to be clear, I did not contribute that patch to connman, it was contributed by Wu Zheng <[email protected]> here
http://git.kernel.org/cgit/network/connman/connman.git/commit/?id=acea08a.
I don't want to take credit for someone else's work.
Thanks
Martin
Quoted 8 lines
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
PATCH v2 1/1 package/connman: fix crash due to iptables 1.6.0 update
Thomas,
Quoted 17 lines · Martin Bark
Thomas,
Quoted 13 lines · Thomas Petazzoni
Dear Martin Bark,
Quoted 10 lines · Martin Bark
iptables was updated to version 1.6.0 in commit
https://git.busybox.net/buildroot/commit/?id=35dc775 however, connman 1.31 crashes when iptables 1.6.0 is used.This issues has already been fixed upstream but is not currently available in a release. To fix connman include the upstream patch. See
http://git.kernel.org/cgit/network/connman/connman.git/commit/?id=acea08aSigned-off-by Martin Bark <[email protected]>
Quoted 7 lines
Quoted 5 lines
Quoted 1 line
---
Applied to master, thanks. Since you already contributed this patch to connman, could you also submit upstream the patch
package/connman/0001-configure-check-for-execinfo.h.patch?Yes I'm happy to can do that.
Actually there is no need, Yann has already had his patch committed to connman, see http://git.kernel.org/cgit/network/connman/connman.git/commit/?id=61b0b13.
So the next release of connman should remove both patches.
Thanks
Martin
Quoted 18 lines
Just to be clear, I did not contribute that patch to connman, it was contributed by Wu Zheng <[email protected]> here
http://git.kernel.org/cgit/network/connman/connman.git/commit/?id=acea08a.
I don't want to take credit for someone else's work.Thanks
Martin
Quoted 8 lines
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
PATCH v2 1/1 package/connman: fix crash due to iptables 1.6.0 update
Martin,
Quoted 3 lines · Martin Bark
Actually there is no need, Yann has already had his patch committed to connman, see http://git.kernel.org/cgit/network/connman/connman.git/commit/?id=61b0b13.
So the next release of connman should remove both patches.
Excellent, thanks for having checked that!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com