summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity
diff options
context:
space:
mode:
authorJian Liang <jianliang@tycoint.com>2018-01-19 14:42:12 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-01-22 10:39:09 +0000
commit10e1be398b9279af50ac1c32772222a72826e3ad (patch)
tree891fff7290cace2cf9e13604a23aa483e8eee368 /meta/recipes-connectivity
parentf4335d224dc6484967ebd46352c151b13b64a939 (diff)
downloadpoky-10e1be398b9279af50ac1c32772222a72826e3ad.tar.gz
connman: Fix a crash using wispr over TLS
This is happened when doing wispr against a HTTPS URL rather than the default one, i.e. http://ipv4.connman.net/online/status.html When gnutls_channel is instantiated, the gnutls_channel->established has to be initiated as FALSE. Otherwise, check_handshake function won't work. A random initial value 1 of gnutls_channel->established will make check_handshake return G_IO_STATUS_NORMAL, when the channel is actually not ready to be used. The observed behaviours are, - wispr is getting random errors in wispr_portal_web_result - ConnMan crashes on exit after those random errors - when wispr is luckly working, ConnMan doesn't crash on exit (From OE-Core rev: 2ea983d4a187ac62e703e85dce622f70e309be05) Signed-off-by: Jian Liang <jianliang@tycoint.com> Signed-off-by: André Draszik <andre.draszik@jci.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-connectivity')
-rw-r--r--meta/recipes-connectivity/connman/connman/0001-giognutls-Fix-a-crash-using-wispr-over-TLS.patch41
-rw-r--r--meta/recipes-connectivity/connman/connman_1.35.bb1
2 files changed, 42 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/connman/connman/0001-giognutls-Fix-a-crash-using-wispr-over-TLS.patch b/meta/recipes-connectivity/connman/connman/0001-giognutls-Fix-a-crash-using-wispr-over-TLS.patch
new file mode 100644
index 0000000000..f9080d4ba9
--- /dev/null
+++ b/meta/recipes-connectivity/connman/connman/0001-giognutls-Fix-a-crash-using-wispr-over-TLS.patch
@@ -0,0 +1,41 @@
1From 929fc9b7068100444e0ffcccd25841f78791e619 Mon Sep 17 00:00:00 2001
2From: Jian Liang <jianliang@tycoint.com>
3Date: Fri, 15 Sep 2017 06:40:08 -0400
4Subject: [PATCH] gweb: Fix a crash using wispr over TLS
5To: connman@lists.01.org
6Cc: wagi@monom.org
7
8When gnutls_channel is instantiated, the gnutls_channel->established
9has to be initiated as FALSE. Otherwise, check_handshake function
10won't work. A random initial value 1 of gnutls_channel->established
11will make check_handshake return G_IO_STATUS_NORMAL, when the channel
12is actually not ready to be used. The observed behaviours are,
13
14- wispr is getting random errors in wispr_portal_web_result
15- ConnMan crashes on exit after those random errors
16- when wispr is luckly working, ConnMan doesn't crash on exit
17
18Signed-off-by: Jian Liang <jianliang@tycoint.com>
19
20---
21Upstream-Status: Backport [https://git.kernel.org/pub/scm/network/connman/connman.git/commit/?id=73e53f3bd9e7debae86341f1eee7b97862a56a5e]
22Signed-off-by: André Draszik <andre.draszik@jci.com>
23 gweb/giognutls.c | 2 +-
24 1 file changed, 1 insertion(+), 1 deletion(-)
25
26diff --git a/gweb/giognutls.c b/gweb/giognutls.c
27index 09dc9e7..c029a8b 100644
28--- a/gweb/giognutls.c
29+++ b/gweb/giognutls.c
30@@ -421,7 +421,7 @@ GIOChannel *g_io_channel_gnutls_new(int fd)
31
32 DBG("");
33
34- gnutls_channel = g_new(GIOGnuTLSChannel, 1);
35+ gnutls_channel = g_new0(GIOGnuTLSChannel, 1);
36
37 channel = (GIOChannel *) gnutls_channel;
38
39--
402.7.4
41
diff --git a/meta/recipes-connectivity/connman/connman_1.35.bb b/meta/recipes-connectivity/connman/connman_1.35.bb
index e7e5d38d61..4663a7e3e8 100644
--- a/meta/recipes-connectivity/connman/connman_1.35.bb
+++ b/meta/recipes-connectivity/connman/connman_1.35.bb
@@ -7,6 +7,7 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/network/${BPN}/${BP}.tar.xz \
7 file://no-version-scripts.patch \ 7 file://no-version-scripts.patch \
8 file://includes.patch \ 8 file://includes.patch \
9 file://0001-session-Keep-track-of-addr-in-fw_snat-session.patch \ 9 file://0001-session-Keep-track-of-addr-in-fw_snat-session.patch \
10 file://0001-giognutls-Fix-a-crash-using-wispr-over-TLS.patch \
10 " 11 "
11SRC_URI_append_libc-musl = " file://0002-resolve-musl-does-not-implement-res_ninit.patch \ 12SRC_URI_append_libc-musl = " file://0002-resolve-musl-does-not-implement-res_ninit.patch \
12 " 13 "