<div dir="ltr">Those two patches were mainstreamed, which will be described in the new commit message as was requested.</div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Sep 19, 2018 at 9:49 AM, Alexander Kanavin <span dir="ltr"><<a href="mailto:alex.kanavin@gmail.com" target="_blank">alex.kanavin@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Well, no. The patch file contains three different patches, all fixing<br>
different things, and this information about the second and third one<br>
for instance has vanished:<br>
<span class=""><br>
-From b8b7878e6cb2a1ed4fcfa256f7e232<wbr>511a40e3d9 Mon Sep 17 00:00:00 2001<br>
-From: Ross Burton <<a href="mailto:ross.burton@intel.com">ross.burton@intel.com</a>><br>
-Date: Tue, 9 Aug 2016 15:37:50 +0100<br>
-Subject: [PATCH 2/3] Check for in6_pktinfo.ipi6_addr explicitly<br>
-<br>
-Instead of assuming that just glibc has this structure, check for it at<br>
-configure as musl also has it.<br>
-<br>
-Based on work by Khem Raj <<a href="mailto:raj.khem@gmail.com">raj.khem@gmail.com</a>>.<br>
<br>
<br>
</span><span class="">-From c0726e432fa0274a2b9c70179b03df<wbr>6720972816 Mon Sep 17 00:00:00 2001<br>
-From: Ross Burton <<a href="mailto:ross.burton@intel.com">ross.burton@intel.com</a>><br>
-Date: Tue, 9 Aug 2016 15:19:23 +0100<br>
-Subject: [PATCH 3/3] Rationalise includes<br>
-<br>
-gweb/gresolv.c uses snprintf() and isspace() so it should include stdio.h and<br>
-ctype.h.<br>
-<br>
-tools/dnsproxy-test uses functions from stdio.h.<br>
-<br>
-musl warns when sys/ headers are included when the non-sys form should be used,<br>
-so switch sys/errno.h and so on to errno.h.<br>
-<br>
-musl also causes redefinition errors when pieces of the networking headers are<br>
-included, so remove the redundant includes.<br>
-<br>
-Based on work by Khem Raj <<a href="mailto:raj.khem@gmail.com">raj.khem@gmail.com</a>>.<br>
<br>
</span>Alex<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
<br>
2018-09-19 0:24 GMT+02:00 Oleksandr Kravchuk<br>
<<a href="mailto:open.source@oleksandr-kravchuk.com">open.source@oleksandr-<wbr>kravchuk.com</a>>:<br>
> Sorry for the delay. This patch hasn't really been changed much: it was<br>
> simply rebased, renamed and converted into git format. Would it be<br>
> enough to keep it the way it is and describe the changes in the commit<br>
> message?<br>
><br>
> On 13/09/2018 23:38, Alexander Kanavin wrote:<br>
>> This one:<br>
>> rename meta/recipes-connectivity/<wbr>connman/connman/{includes.<wbr>patch =><br>
>> 0001-Use-AC_USE_SYSTEM_<wbr>EXTENSIONS.patch} (68%)<br>
>><br>
>> I think you should make two commits: one that splits this patch in<br>
>> three, and another which actually does the version update.<br>
>><br>
>> Alex<br>
>><br>
>> 2018-09-13 23:08 GMT+02:00 Oleksandr Kravchuk<br>
>> <<a href="mailto:open.source@oleksandr-kravchuk.com">open.source@oleksandr-<wbr>kravchuk.com</a>>:<br>
>>> Sure, will do.<br>
>>><br>
>>>>> Also, one patch is changed in a way that makes it lose significant amount<br>
>>>>> of information (it's an amalgamation of three patches)<br>
>>> Could you please clarify which one do you mean? Thank you.<br>
>>><br>
>>><br>
>>> On 9/13/18 9:46 PM, Alexander Kanavin wrote:<br>
>>>> Please explain the changes to patches (not as a reply to me, but in<br>
>>>> the commit message itself).<br>
>>>> If they are deleted because upstream already has them, it should be<br>
>>>> mentioned explicitly.<br>
>>>><br>
>>>> Also, one patch is changed in a way that makes it lose significant<br>
>>>> amount of information<br>
>>>> (it's an amalgamation of three patches). Perhaps we should just split<br>
>>>> it in three?<br>
>>>><br>
>>>> Alex<br>
>>>><br>
>>>> 2018-09-13 21:04 GMT+02:00 Oleksandr Kravchuk<br>
>>>> <<a href="mailto:open.source@oleksandr-kravchuk.com">open.source@oleksandr-<wbr>kravchuk.com</a>>:<br>
>>>>> Signed-off-by: Oleksandr Kravchuk <<a href="mailto:dev@sashko.rv.ua">dev@sashko.rv.ua</a>><br>
>>>>> ---<br>
>>>>> meta/recipes-connectivity/<wbr>connman/connman.inc | 2 +-<br>
>>>>> ...> 0001-Use-AC_USE_SYSTEM_<wbr>EXTENSIONS.patch} | 446 ++++++++----------<br>
>>>>> ...tls-Fix-a-crash-using-<wbr>wispr-over-TLS.patch | 41 --<br>
>>>>> ...refixlen-to-iproute_<wbr>default_function.patch | 63 ---<br>
>>>>> ...eep-track-of-addr-in-fw_<wbr>snat-session.patch | 112 -----<br>
>>>>> ...ubnet-route-creation-<wbr>deletion-in-ipr.patch | 69 ---<br>
>>>>> ...PIs-for-creating-and-<wbr>deleting-subnet.patch | 68 ---<br>
>>>>> ...net-route-creation-and-<wbr>deletion-APIs.patch | 77 ---<br>
>>>>> .../connman/<a href="http://connman_1.35.bb" rel="noreferrer" target="_blank">connman_1.35.bb</a> | 22 -<br>
>>>>> .../connman/<a href="http://connman_1.36.bb" rel="noreferrer" target="_blank">connman_1.36.bb</a> | 17 +<br>
>>>>> 10 files changed, 212 insertions(+), 705 deletions(-)<br>
>>>>> rename meta/recipes-connectivity/<wbr>connman/connman/{includes.<wbr>patch =><br>
>>>>> 0001-Use-AC_USE_SYSTEM_<wbr>EXTENSIONS.patch} (68%)<br>
>>>>> delete mode 100644<br>
>>>>> meta/recipes-connectivity/<wbr>connman/connman/0001-<wbr>giognutls-Fix-a-crash-using-<wbr>wispr-over-TLS.patch<br>
>>>>> delete mode 100644<br>
>>>>> meta/recipes-connectivity/<wbr>connman/connman/0001-inet-Add-<wbr>prefixlen-to-iproute_default_<wbr>function.patch<br>
>>>>> delete mode 100644<br>
>>>>> meta/recipes-connectivity/<wbr>connman/connman/0001-session-<wbr>Keep-track-of-addr-in-fw_snat-<wbr>session.patch<br>
>>>>> delete mode 100644<br>
>>>>> meta/recipes-connectivity/<wbr>connman/connman/0002-inet-<wbr>Implement-subnet-route-<wbr>creation-deletion-in-ipr.patch<br>
>>>>> delete mode 100644<br>
>>>>> meta/recipes-connectivity/<wbr>connman/connman/0003-inet-<wbr>Implement-APIs-for-creating-<wbr>and-deleting-subnet.patch<br>
>>>>> delete mode 100644<br>
>>>>> meta/recipes-connectivity/<wbr>connman/connman/0004-session-<wbr>Use-subnet-route-creation-and-<wbr>deletion-APIs.patch<br>
>>>>> delete mode 100644 meta/recipes-connectivity/<wbr>connman/<a href="http://connman_1.35.bb" rel="noreferrer" target="_blank">connman_1.35.bb</a><br>
>>>>> create mode 100644 meta/recipes-connectivity/<wbr>connman/<a href="http://connman_1.36.bb" rel="noreferrer" target="_blank">connman_1.36.bb</a><br>
>>>>><br>
>>>>> diff --git a/meta/recipes-connectivity/<wbr>connman/connman.inc<br>
>>>>> b/meta/recipes-connectivity/<wbr>connman/connman.inc<br>
>>>>> index 2b03f9cb06..0ba375137d 100644<br>
>>>>> --- a/meta/recipes-connectivity/<wbr>connman/connman.inc<br>
>>>>> +++ b/meta/recipes-connectivity/<wbr>connman/connman.inc<br>
>>>>> @@ -156,7 +156,7 @@ RDEPENDS_${PN}-client ="${PN}"<br>
>>>>><br>
>>>>> FILES_${PN} = "${bindir}/* ${sbindir}/* ${libexecdir}/*<br>
>>>>> ${libdir}/lib*.so.* \<br>
>>>>> ${libdir}/connman/plugins \<br>
>>>>> - ${sysconfdir} ${sharedstatedir} ${localstatedir} \<br>
>>>>> + ${sysconfdir} ${sharedstatedir} ${localstatedir} ${datadir}<br>
>>>>> \<br>
>>>>> ${base_bindir}/* ${base_sbindir}/* ${base_libdir}/*.so*<br>
>>>>> ${datadir}/${PN} \<br>
>>>>> ${datadir}/dbus-1/system-<wbr>services/* \<br>
>>>>> ${sysconfdir}/tmpfiles.d/<wbr>connman_resolvconf.conf"<br>
>>>>> diff --git a/meta/recipes-connectivity/<wbr>connman/connman/includes.patch<br>
>>>>> b/meta/recipes-connectivity/<wbr>connman/connman/0001-Use-AC_<wbr>USE_SYSTEM_EXTENSIONS.patch<br>
>>>>> similarity index 68%<br>
>>>>> rename from meta/recipes-connectivity/<wbr>connman/connman/includes.patch<br>
>>>>> rename to<br>
>>>>> meta/recipes-connectivity/<wbr>connman/connman/0001-Use-AC_<wbr>USE_SYSTEM_EXTENSIONS.patch<br>
>>>>> index 55cb187931..e826bf002d 100644<br>
>>>>> --- a/meta/recipes-connectivity/<wbr>connman/connman/includes.patch<br>
>>>>> +++<br>
>>>>> b/meta/recipes-connectivity/<wbr>connman/connman/0001-Use-AC_<wbr>USE_SYSTEM_EXTENSIONS.patch<br>
>>>>> @@ -1,36 +1,40 @@<br>
>>>>> -Fix various issues which cause problems under musl.<br>
>>>>> -<br>
>>>>> -Upstream-Status: Submitted<br>
>>>>> -Signed-off-by: Ross Burton <<a href="mailto:ross.burton@intel.com">ross.burton@intel.com</a>><br>
>>>>> -<br>
>>>>> -From 630516bcc0233b047f65665c003201<wbr>ba6e77453d Mon Sep 17 00:00:00 2001<br>
>>>>> +From 56fc228eebadc546d969a7073caf14<wbr>d465ef3e5a Mon Sep 17 00:00:00 2001<br>
>>>>> From: Ross Burton <<a href="mailto:ross.burton@intel.com">ross.burton@intel.com</a>><br>
>>>>> -Date: Tue, 9 Aug 2016 16:22:36 +0100<br>
>>>>> -Subject: [PATCH 1/3] Use AC_USE_SYSTEM_EXTENSIONS<br>
>>>>> +Date: Thu, 13 Sep 2018 19:57:54 +0200<br>
>>>>> +Subject: [PATCH] Use AC_USE_SYSTEM_EXTENSIONS<br>
>>>>><br>
>>>>> -Instead of using #define _GNU_SOURCE in some source files which causes<br>
>>>>> problems<br>
>>>>> -when building with musl as more files need the define, simply use<br>
>>>>> -AC_USE_SYSTEM_EXTENSIONS in <a href="http://configure.ac" rel="noreferrer" target="_blank">configure.ac</a> to get it defined globally.<br>
>>>>> +Instead of using #define _GNU_SOURCE in some source files which causes<br>
>>>>> +problems when building with musl as more files need the define, simply<br>
>>>>> +use AC_USE_SYSTEM_EXTENSIONS in <a href="http://configure.ac" rel="noreferrer" target="_blank">configure.ac</a> to get it defined globally.<br>
>>>>> ---<br>
>>>>> - <a href="http://configure.ac" rel="noreferrer" target="_blank">configure.ac</a> | 1 +<br>
>>>>> - gdhcp/client.c | 1 -<br>
>>>>> - plugins/tist.c | 1 -<br>
>>>>> - src/backtrace.c | 1 -<br>
>>>>> - src/inet.c | 1 -<br>
>>>>> - src/log.c | 1 -<br>
>>>>> - src/ntp.c | 1 -<br>
>>>>> - src/resolver.c | 1 -<br>
>>>>> - src/rfkill.c | 1 -<br>
>>>>> - src/stats.c | 1 -<br>
>>>>> - src/timezone.c | 1 -<br>
>>>>> - tools/stats-tool.c | 1 -<br>
>>>>> - tools/tap-test.c | 1 -<br>
>>>>> - tools/wispr.c | 1 -<br>
>>>>> - vpn/plugins/vpn.c | 1 -<br>
>>>>> - 15 files changed, 1 insertion(+), 14 deletions(-)<br>
>>>>> + <a href="http://configure.ac" rel="noreferrer" target="_blank">configure.ac</a> | 3 +++<br>
>>>>> + gdhcp/client.c | 1 -<br>
>>>>> + gdhcp/common.h | 5 +++--<br>
>>>>> + gweb/gresolv.c | 2 ++<br>
>>>>> + plugins/tist.c | 1 -<br>
>>>>> + plugins/wifi.c | 3 +--<br>
>>>>> + src/backtrace.c | 1 -<br>
>>>>> + src/inet.c | 1 -<br>
>>>>> + src/ippool.c | 1 -<br>
>>>>> + src/iptables.c | 2 +-<br>
>>>>> + src/log.c | 1 -<br>
>>>>> + src/ntp.c | 1 -<br>
>>>>> + src/resolver.c | 1 -<br>
>>>>> + src/rfkill.c | 1 -<br>
>>>>> + src/stats.c | 1 -<br>
>>>>> + src/tethering.c | 2 --<br>
>>>>> + src/timezone.c | 1 -<br>
>>>>> + tools/dhcp-test.c | 1 -<br>
>>>>> + tools/dnsproxy-test.c | 1 +<br>
>>>>> + tools/private-network-test.c | 2 +-<br>
>>>>> + tools/stats-tool.c | 1 -<br>
>>>>> + tools/tap-test.c | 3 +--<br>
>>>>> + tools/wispr.c | 1 -<br>
>>>>> + vpn/plugins/vpn.c | 1 -<br>
>>>>> + 24 files changed, 13 insertions(+), 25 deletions(-)<br>
>>>>><br>
>>>>> diff --git a/<a href="http://configure.ac" rel="noreferrer" target="_blank">configure.ac</a> b/<a href="http://configure.ac" rel="noreferrer" target="_blank">configure.ac</a><br>
>>>>> -index 6e66ab3..bacf5ec 100644<br>
>>>>> +index 39745f76..984126c2 100644<br>
>>>>> --- a/<a href="http://configure.ac" rel="noreferrer" target="_blank">configure.ac</a><br>
>>>>> +++ b/<a href="http://configure.ac" rel="noreferrer" target="_blank">configure.ac</a><br>
>>>>> @@ -20,6 +20,7 @@ AC_SUBST(abs_top_srcdir)<br>
>>>>> @@ -41,8 +45,17 @@ index 6e66ab3..bacf5ec 100644<br>
>>>>><br>
>>>>> AC_PROG_CC<br>
>>>>> AM_PROG_CC_C_O<br>
>>>>> +@@ -185,6 +186,8 @@ AC_CHECK_LIB(resolv, ns_initparse, dummy=yes, [<br>
>>>>> + AC_CHECK_HEADERS([execinfo.h])<br>
>>>>> + AM_CONDITIONAL([BACKTRACE], [test "${ac_cv_header_execinfo_h}" =<br>
>>>>> "yes"])<br>
>>>>> +<br>
>>>>> ++AC_CHECK_MEMBERS([struct in6_pktinfo.ipi6_addr], [], [], [[#include<br>
>>>>> <netinet/in.h>]])<br>
>>>>> ++<br>
>>>>> + AC_CHECK_FUNC(signalfd, dummy=yes,<br>
>>>>> + AC_MSG_ERROR(signalfd support is required))<br>
>>>>> +<br>
>>>>> diff --git a/gdhcp/client.c b/gdhcp/client.c<br>
>>>>> -index fbb40ab..3aeb089 100644<br>
>>>>> +index 67357782..c7db76f0 100644<br>
>>>>> --- a/gdhcp/client.c<br>
>>>>> +++ b/gdhcp/client.c<br>
>>>>> @@ -23,7 +23,6 @@<br>
>>>>> @@ -53,8 +66,49 @@ index fbb40ab..3aeb089 100644<br>
>>>>> #include <stdio.h><br>
>>>>> #include <errno.h><br>
>>>>> #include <unistd.h><br>
>>>>> +diff --git a/gdhcp/common.h b/gdhcp/common.h<br>
>>>>> +index 75abc183..6899499e 100644<br>
>>>>> +--- a/gdhcp/common.h<br>
>>>>> ++++ b/gdhcp/common.h<br>
>>>>> +@@ -19,6 +19,7 @@<br>
>>>>> + *<br>
>>>>> + */<br>
>>>>> +<br>
>>>>> ++#include <config.h><br>
>>>>> + #include <netinet/udp.h><br>
>>>>> + #include <netinet/ip.h><br>
>>>>> +<br>
>>>>> +@@ -170,8 +171,8 @@ static const uint8_t dhcp_option_lengths[] = {<br>
>>>>> + [OPTION_U32] = 4,<br>
>>>>> + };<br>
>>>>> +<br>
>>>>> +-/* already defined within netinet/in.h if using GNU compiler */<br>
>>>>> +-#ifndef __USE_GNU<br>
>>>>> ++/* already defined within netinet/in.h if using glibc or musl */<br>
>>>>> ++#ifndef HAVE_STRUCT_IN6_PKTINFO_IPI6_<wbr>ADDR<br>
>>>>> + struct in6_pktinfo {<br>
>>>>> + struct in6_addr ipi6_addr; /* src/dst IPv6 address */<br>
>>>>> + unsigned int ipi6_ifindex; /* send/recv interface index */<br>
>>>>> +diff --git a/gweb/gresolv.c b/gweb/gresolv.c<br>
>>>>> +index 81c79b6c..180e57ba 100644<br>
>>>>> +--- a/gweb/gresolv.c<br>
>>>>> ++++ b/gweb/gresolv.c<br>
>>>>> +@@ -23,11 +23,13 @@<br>
>>>>> + #include <config.h><br>
>>>>> + #endif<br>
>>>>> +<br>
>>>>> ++#include <ctype.h><br>
>>>>> + #include <errno.h><br>
>>>>> + #include <unistd.h><br>
>>>>> + #include <stdarg.h><br>
>>>>> + #include <string.h><br>
>>>>> + #include <stdlib.h><br>
>>>>> ++#include <stdio.h><br>
>>>>> + #include <resolv.h><br>
>>>>> + #include <sys/types.h><br>
>>>>> + #include <sys/socket.h><br>
>>>>> diff --git a/plugins/tist.c b/plugins/tist.c<br>
>>>>> -index ad5ef79..cc2800a 100644<br>
>>>>> +index ad5ef79e..cc2800a1 100644<br>
>>>>> --- a/plugins/tist.c<br>
>>>>> +++ b/plugins/tist.c<br>
>>>>> @@ -23,7 +23,6 @@<br>
>>>>> @@ -65,8 +119,23 @@ index ad5ef79..cc2800a 100644<br>
>>>>> #include <stdio.h><br>
>>>>> #include <stdbool.h><br>
>>>>> #include <stdlib.h><br>
>>>>> +diff --git a/plugins/wifi.c b/plugins/wifi.c<br>
>>>>> +index dc08c6af..46e4cca4 100644<br>
>>>>> +--- a/plugins/wifi.c<br>
>>>>> ++++ b/plugins/wifi.c<br>
>>>>> +@@ -30,9 +30,8 @@<br>
>>>>> + #include <string.h><br>
>>>>> + #include <sys/ioctl.h><br>
>>>>> + #include <sys/socket.h><br>
>>>>> +-#include <linux/if_arp.h><br>
>>>>> +-#include <linux/wireless.h><br>
>>>>> + #include <net/ethernet.h><br>
>>>>> ++#include <linux/wireless.h><br>
>>>>> +<br>
>>>>> + #ifndef IFF_LOWER_UP<br>
>>>>> + #define IFF_LOWER_UP 0x10000<br>
>>>>> diff --git a/src/backtrace.c b/src/backtrace.c<br>
>>>>> -index 6a66c0a..4dbdda8 100644<br>
>>>>> +index e8d7f432..bede6698 100644<br>
>>>>> --- a/src/backtrace.c<br>
>>>>> +++ b/src/backtrace.c<br>
>>>>> @@ -24,7 +24,6 @@<br>
>>>>> @@ -78,7 +147,7 @@ index 6a66c0a..4dbdda8 100644<br>
>>>>> #include <unistd.h><br>
>>>>> #include <stdlib.h><br>
>>>>> diff --git a/src/inet.c b/src/inet.c<br>
>>>>> -index 69ded19..81d92c2 100644<br>
>>>>> +index a31372b5..a58ce7c1 100644<br>
>>>>> --- a/src/inet.c<br>
>>>>> +++ b/src/inet.c<br>
>>>>> @@ -25,7 +25,6 @@<br>
>>>>> @@ -89,8 +158,33 @@ index 69ded19..81d92c2 100644<br>
>>>>> #include <stdio.h><br>
>>>>> #include <errno.h><br>
>>>>> #include <unistd.h><br>
>>>>> +diff --git a/src/ippool.c b/src/ippool.c<br>
>>>>> +index cea1dccd..8a645da2 100644<br>
>>>>> +--- a/src/ippool.c<br>
>>>>> ++++ b/src/ippool.c<br>
>>>>> +@@ -28,7 +28,6 @@<br>
>>>>> + #include <stdio.h><br>
>>>>> + #include <string.h><br>
>>>>> + #include <unistd.h><br>
>>>>> +-#include <sys/errno.h><br>
>>>>> + #include <sys/socket.h><br>
>>>>> +<br>
>>>>> + #include "connman.h"<br>
>>>>> +diff --git a/src/iptables.c b/src/iptables.c<br>
>>>>> +index f3670e77..469effed 100644<br>
>>>>> +--- a/src/iptables.c<br>
>>>>> ++++ b/src/iptables.c<br>
>>>>> +@@ -28,7 +28,7 @@<br>
>>>>> + #include <stdio.h><br>
>>>>> + #include <string.h><br>
>>>>> + #include <unistd.h><br>
>>>>> +-#include <sys/errno.h><br>
>>>>> ++#include <errno.h><br>
>>>>> + #include <sys/socket.h><br>
>>>>> + #include <xtables.h><br>
>>>>> + #include <inttypes.h><br>
>>>>> diff --git a/src/log.c b/src/log.c<br>
>>>>> -index 9bae4a3..f7e82e5 100644<br>
>>>>> +index 9bae4a3d..f7e82e5d 100644<br>
>>>>> --- a/src/log.c<br>
>>>>> +++ b/src/log.c<br>
>>>>> @@ -23,7 +23,6 @@<br>
>>>>> @@ -102,7 +196,7 @@ index 9bae4a3..f7e82e5 100644<br>
>>>>> #include <unistd.h><br>
>>>>> #include <stdarg.h><br>
>>>>> diff --git a/src/ntp.c b/src/ntp.c<br>
>>>>> -index dd246eb..db8ae96 100644<br>
>>>>> +index 51ba9aac..724ca188 100644<br>
>>>>> --- a/src/ntp.c<br>
>>>>> +++ b/src/ntp.c<br>
>>>>> @@ -23,7 +23,6 @@<br>
>>>>> @@ -114,7 +208,7 @@ index dd246eb..db8ae96 100644<br>
>>>>> #include <fcntl.h><br>
>>>>> #include <unistd.h><br>
>>>>> diff --git a/src/resolver.c b/src/resolver.c<br>
>>>>> -index fbe4be7..ef61f92 100644<br>
>>>>> +index 76f0a8e1..10121aa5 100644<br>
>>>>> --- a/src/resolver.c<br>
>>>>> +++ b/src/resolver.c<br>
>>>>> @@ -23,7 +23,6 @@<br>
>>>>> @@ -126,7 +220,7 @@ index fbe4be7..ef61f92 100644<br>
>>>>> #include <errno.h><br>
>>>>> #include <fcntl.h><br>
>>>>> diff --git a/src/rfkill.c b/src/rfkill.c<br>
>>>>> -index 2bfb092..af49d12 100644<br>
>>>>> +index d9bed4d2..b2514c41 100644<br>
>>>>> --- a/src/rfkill.c<br>
>>>>> +++ b/src/rfkill.c<br>
>>>>> @@ -23,7 +23,6 @@<br>
>>>>> @@ -138,7 +232,7 @@ index 2bfb092..af49d12 100644<br>
>>>>> #include <errno.h><br>
>>>>> #include <fcntl.h><br>
>>>>> diff --git a/src/stats.c b/src/stats.c<br>
>>>>> -index 26343b1..cfcdc94 100644<br>
>>>>> +index 663bc382..c9ddc2e8 100644<br>
>>>>> --- a/src/stats.c<br>
>>>>> +++ b/src/stats.c<br>
>>>>> @@ -23,7 +23,6 @@<br>
>>>>> @@ -149,8 +243,21 @@ index 26343b1..cfcdc94 100644<br>
>>>>> #include <errno.h><br>
>>>>> #include <sys/mman.h><br>
>>>>> #include <sys/types.h><br>
>>>>> +diff --git a/src/tethering.c b/src/tethering.c<br>
>>>>> +index 4b202369..f3cb36f4 100644<br>
>>>>> +--- a/src/tethering.c<br>
>>>>> ++++ b/src/tethering.c<br>
>>>>> +@@ -34,8 +34,6 @@<br>
>>>>> + #include <string.h><br>
>>>>> + #include <fcntl.h><br>
>>>>> + #include <netinet/in.h><br>
>>>>> +-#include <linux/sockios.h><br>
>>>>> +-#include <linux/if_tun.h><br>
>>>>> + #include <linux/if_bridge.h><br>
>>>>> +<br>
>>>>> + #include "connman.h"<br>
>>>>> diff --git a/src/timezone.c b/src/timezone.c<br>
>>>>> -index e346b11..8e91267 100644<br>
>>>>> +index e346b11a..8e912670 100644<br>
>>>>> --- a/src/timezone.c<br>
>>>>> +++ b/src/timezone.c<br>
>>>>> @@ -23,7 +23,6 @@<br>
>>>>> @@ -161,216 +268,8 @@ index e346b11..8e91267 100644<br>
>>>>> #include <errno.h><br>
>>>>> #include <stdio.h><br>
>>>>> #include <fcntl.h><br>
>>>>> -diff --git a/tools/stats-tool.c b/tools/stats-tool.c<br>
>>>>> -index b076478..428d94b 100644<br>
>>>>> ---- a/tools/stats-tool.c<br>
>>>>> -+++ b/tools/stats-tool.c<br>
>>>>> -@@ -22,7 +22,6 @@<br>
>>>>> - #include <config.h><br>
>>>>> - #endif<br>
>>>>> -<br>
>>>>> --#define _GNU_SOURCE<br>
>>>>> - #include <sys/mman.h><br>
>>>>> - #include <sys/types.h><br>
>>>>> - #include <sys/stat.h><br>
>>>>> -diff --git a/tools/tap-test.c b/tools/tap-test.c<br>
>>>>> -index fdc098a..57917f5 100644<br>
>>>>> ---- a/tools/tap-test.c<br>
>>>>> -+++ b/tools/tap-test.c<br>
>>>>> -@@ -23,7 +23,6 @@<br>
>>>>> - #include <config.h><br>
>>>>> - #endif<br>
>>>>> -<br>
>>>>> --#define _GNU_SOURCE<br>
>>>>> - #include <stdio.h><br>
>>>>> - #include <errno.h><br>
>>>>> - #include <fcntl.h><br>
>>>>> -diff --git a/tools/wispr.c b/tools/wispr.c<br>
>>>>> -index d5f9341..e56dfc1 100644<br>
>>>>> ---- a/tools/wispr.c<br>
>>>>> -+++ b/tools/wispr.c<br>
>>>>> -@@ -23,7 +23,6 @@<br>
>>>>> - #include <config.h><br>
>>>>> - #endif<br>
>>>>> -<br>
>>>>> --#define _GNU_SOURCE<br>
>>>>> - #include <stdio.h><br>
>>>>> - #include <fcntl.h><br>
>>>>> - #include <unistd.h><br>
>>>>> -diff --git a/vpn/plugins/vpn.c b/vpn/plugins/vpn.c<br>
>>>>> -index 9a42385..479c3a7 100644<br>
>>>>> ---- a/vpn/plugins/vpn.c<br>
>>>>> -+++ b/vpn/plugins/vpn.c<br>
>>>>> -@@ -23,7 +23,6 @@<br>
>>>>> - #include <config.h><br>
>>>>> - #endif<br>
>>>>> -<br>
>>>>> --#define _GNU_SOURCE<br>
>>>>> - #include <string.h><br>
>>>>> - #include <fcntl.h><br>
>>>>> - #include <unistd.h><br>
>>>>> ---<br>
>>>>> -2.8.1<br>
>>>>> -<br>
>>>>> -<br>
>>>>> -From b8b7878e6cb2a1ed4fcfa256f7e232<wbr>511a40e3d9 Mon Sep 17 00:00:00 2001<br>
>>>>> -From: Ross Burton <<a href="mailto:ross.burton@intel.com">ross.burton@intel.com</a>><br>
>>>>> -Date: Tue, 9 Aug 2016 15:37:50 +0100<br>
>>>>> -Subject: [PATCH 2/3] Check for in6_pktinfo.ipi6_addr explicitly<br>
>>>>> -<br>
>>>>> -Instead of assuming that just glibc has this structure, check for it at<br>
>>>>> -configure as musl also has it.<br>
>>>>> -<br>
>>>>> -Based on work by Khem Raj <<a href="mailto:raj.khem@gmail.com">raj.khem@gmail.com</a>>.<br>
>>>>> ----<br>
>>>>> - <a href="http://configure.ac" rel="noreferrer" target="_blank">configure.ac</a> | 2 ++<br>
>>>>> - gdhcp/common.h | 5 +++--<br>
>>>>> - 2 files changed, 5 insertions(+), 2 deletions(-)<br>
>>>>> -<br>
>>>>> -diff --git a/<a href="http://configure.ac" rel="noreferrer" target="_blank">configure.ac</a> b/<a href="http://configure.ac" rel="noreferrer" target="_blank">configure.ac</a><br>
>>>>> -index bacf5ec..ad00456 100644<br>
>>>>> ---- a/<a href="http://configure.ac" rel="noreferrer" target="_blank">configure.ac</a><br>
>>>>> -+++ b/<a href="http://configure.ac" rel="noreferrer" target="_blank">configure.ac</a><br>
>>>>> -@@ -186,6 +186,8 @@ AC_CHECK_LIB(resolv, ns_initparse, dummy=yes, [<br>
>>>>> - AC_CHECK_HEADERS([execinfo.h])<br>
>>>>> - AM_CONDITIONAL([BACKTRACE], [test "${ac_cv_header_execinfo_h}" =<br>
>>>>> "yes"])<br>
>>>>> -<br>
>>>>> -+AC_CHECK_MEMBERS([struct in6_pktinfo.ipi6_addr], [], [], [[#include<br>
>>>>> <netinet/in.h>]])<br>
>>>>> -+<br>
>>>>> - AC_CHECK_FUNC(signalfd, dummy=yes,<br>
>>>>> - AC_MSG_ERROR(signalfd support is required))<br>
>>>>> -<br>
>>>>> -diff --git a/gdhcp/common.h b/gdhcp/common.h<br>
>>>>> -index 75abc18..6899499 100644<br>
>>>>> ---- a/gdhcp/common.h<br>
>>>>> -+++ b/gdhcp/common.h<br>
>>>>> -@@ -19,6 +19,7 @@<br>
>>>>> - *<br>
>>>>> - */<br>
>>>>> -<br>
>>>>> -+#include <config.h><br>
>>>>> - #include <netinet/udp.h><br>
>>>>> - #include <netinet/ip.h><br>
>>>>> -<br>
>>>>> -@@ -170,8 +171,8 @@ static const uint8_t dhcp_option_lengths[] = {<br>
>>>>> - [OPTION_U32] = 4,<br>
>>>>> - };<br>
>>>>> -<br>
>>>>> --/* already defined within netinet/in.h if using GNU compiler */<br>
>>>>> --#ifndef __USE_GNU<br>
>>>>> -+/* already defined within netinet/in.h if using glibc or musl */<br>
>>>>> -+#ifndef HAVE_STRUCT_IN6_PKTINFO_IPI6_<wbr>ADDR<br>
>>>>> - struct in6_pktinfo {<br>
>>>>> - struct in6_addr ipi6_addr; /* src/dst IPv6 address */<br>
>>>>> - unsigned int ipi6_ifindex; /* send/recv interface index */<br>
>>>>> ---<br>
>>>>> -2.8.1<br>
>>>>> -<br>
>>>>> -<br>
>>>>> -From c0726e432fa0274a2b9c70179b03df<wbr>6720972816 Mon Sep 17 00:00:00 2001<br>
>>>>> -From: Ross Burton <<a href="mailto:ross.burton@intel.com">ross.burton@intel.com</a>><br>
>>>>> -Date: Tue, 9 Aug 2016 15:19:23 +0100<br>
>>>>> -Subject: [PATCH 3/3] Rationalise includes<br>
>>>>> -<br>
>>>>> -gweb/gresolv.c uses snprintf() and isspace() so it should include<br>
>>>>> stdio.h and<br>
>>>>> -ctype.h.<br>
>>>>> -<br>
>>>>> -tools/dnsproxy-test uses functions from stdio.h.<br>
>>>>> -<br>
>>>>> -musl warns when sys/ headers are included when the non-sys form should<br>
>>>>> be used,<br>
>>>>> -so switch sys/errno.h and so on to errno.h.<br>
>>>>> -<br>
>>>>> -musl also causes redefinition errors when pieces of the networking<br>
>>>>> headers are<br>
>>>>> -included, so remove the redundant includes.<br>
>>>>> -<br>
>>>>> -Based on work by Khem Raj <<a href="mailto:raj.khem@gmail.com">raj.khem@gmail.com</a>>.<br>
>>>>> ----<br>
>>>>> - gweb/gresolv.c | 2 ++<br>
>>>>> - plugins/wifi.c | 3 +--<br>
>>>>> - src/ippool.c | 1 -<br>
>>>>> - src/iptables.c | 2 +-<br>
>>>>> - src/tethering.c | 2 --<br>
>>>>> - tools/dhcp-test.c | 1 -<br>
>>>>> - tools/dnsproxy-test.c | 1 +<br>
>>>>> - tools/private-network-test.c | 2 +-<br>
>>>>> - tools/tap-test.c | 2 +-<br>
>>>>> - 9 files changed, 7 insertions(+), 9 deletions(-)<br>
>>>>> -<br>
>>>>> -diff --git a/gweb/gresolv.c b/gweb/gresolv.c<br>
>>>>> -index 8a51a9f..d55027c 100644<br>
>>>>> ---- a/gweb/gresolv.c<br>
>>>>> -+++ b/gweb/gresolv.c<br>
>>>>> -@@ -23,11 +23,13 @@<br>
>>>>> - #include <config.h><br>
>>>>> - #endif<br>
>>>>> -<br>
>>>>> -+#include <ctype.h><br>
>>>>> - #include <errno.h><br>
>>>>> - #include <unistd.h><br>
>>>>> - #include <stdarg.h><br>
>>>>> - #include <string.h><br>
>>>>> - #include <stdlib.h><br>
>>>>> -+#include <stdio.h><br>
>>>>> - #include <resolv.h><br>
>>>>> - #include <sys/types.h><br>
>>>>> - #include <sys/socket.h><br>
>>>>> -diff --git a/plugins/wifi.c b/plugins/wifi.c<br>
>>>>> -index 9d56671..148131d 100644<br>
>>>>> ---- a/plugins/wifi.c<br>
>>>>> -+++ b/plugins/wifi.c<br>
>>>>> -@@ -30,9 +30,8 @@<br>
>>>>> - #include <string.h><br>
>>>>> - #include <sys/ioctl.h><br>
>>>>> - #include <sys/socket.h><br>
>>>>> --#include <linux/if_arp.h><br>
>>>>> --#include <linux/wireless.h><br>
>>>>> - #include <net/ethernet.h><br>
>>>>> -+#include <linux/wireless.h><br>
>>>>> -<br>
>>>>> - #ifndef IFF_LOWER_UP<br>
>>>>> - #define IFF_LOWER_UP 0x10000<br>
>>>>> -diff --git a/src/ippool.c b/src/ippool.c<br>
>>>>> -index cea1dcc..8a645da 100644<br>
>>>>> ---- a/src/ippool.c<br>
>>>>> -+++ b/src/ippool.c<br>
>>>>> -@@ -28,7 +28,6 @@<br>
>>>>> - #include <stdio.h><br>
>>>>> - #include <string.h><br>
>>>>> - #include <unistd.h><br>
>>>>> --#include <sys/errno.h><br>
>>>>> - #include <sys/socket.h><br>
>>>>> -<br>
>>>>> - #include "connman.h"<br>
>>>>> -diff --git a/src/iptables.c b/src/iptables.c<br>
>>>>> -index 5ef757a..82e3ac4 100644<br>
>>>>> ---- a/src/iptables.c<br>
>>>>> -+++ b/src/iptables.c<br>
>>>>> -@@ -28,7 +28,7 @@<br>
>>>>> - #include <stdio.h><br>
>>>>> - #include <string.h><br>
>>>>> - #include <unistd.h><br>
>>>>> --#include <sys/errno.h><br>
>>>>> -+#include <errno.h><br>
>>>>> - #include <sys/socket.h><br>
>>>>> - #include <xtables.h><br>
>>>>> - #include <inttypes.h><br>
>>>>> -diff --git a/src/tethering.c b/src/tethering.c<br>
>>>>> -index 3153349..ad062d5 100644<br>
>>>>> ---- a/src/tethering.c<br>
>>>>> -+++ b/src/tethering.c<br>
>>>>> -@@ -31,10 +31,8 @@<br>
>>>>> - #include <stdio.h><br>
>>>>> - #include <sys/ioctl.h><br>
>>>>> - #include <net/if.h><br>
>>>>> --#include <linux/sockios.h><br>
>>>>> - #include <string.h><br>
>>>>> - #include <fcntl.h><br>
>>>>> --#include <linux/if_tun.h><br>
>>>>> - #include <netinet/in.h><br>
>>>>> - #include <linux/if_bridge.h><br>
>>>>> -<br>
>>>>> diff --git a/tools/dhcp-test.c b/tools/dhcp-test.c<br>
>>>>> -index c34e10a..eae66fc 100644<br>
>>>>> +index c34e10a8..eae66fc2 100644<br>
>>>>> --- a/tools/dhcp-test.c<br>
>>>>> +++ b/tools/dhcp-test.c<br>
>>>>> @@ -33,7 +33,6 @@<br>
>>>>> @@ -382,7 +281,7 @@ index c34e10a..eae66fc 100644<br>
>>>>> #include <gdhcp/gdhcp.h><br>
>>>>><br>
>>>>> diff --git a/tools/dnsproxy-test.c b/tools/dnsproxy-test.c<br>
>>>>> -index 551cae9..371e2e2 100644<br>
>>>>> +index 551cae91..371e2e23 100644<br>
>>>>> --- a/tools/dnsproxy-test.c<br>
>>>>> +++ b/tools/dnsproxy-test.c<br>
>>>>> @@ -24,6 +24,7 @@<br>
>>>>> @@ -394,7 +293,7 @@ index 551cae9..371e2e2 100644<br>
>>>>> #include <string.h><br>
>>>>> #include <unistd.h><br>
>>>>> diff --git a/tools/private-network-test.c<br>
>>>>> b/tools/private-network-test.c<br>
>>>>> -index 3dd115b..2828bb3 100644<br>
>>>>> +index 3dd115ba..2828bb30 100644<br>
>>>>> --- a/tools/private-network-test.c<br>
>>>>> +++ b/tools/private-network-test.c<br>
>>>>> @@ -32,7 +32,7 @@<br>
>>>>> @@ -406,11 +305,29 @@ index 3dd115b..2828bb3 100644<br>
>>>>> #include <sys/signalfd.h><br>
>>>>> #include <unistd.h><br>
>>>>><br>
>>>>> +diff --git a/tools/stats-tool.c b/tools/stats-tool.c<br>
>>>>> +index efa39de2..5695048f 100644<br>
>>>>> +--- a/tools/stats-tool.c<br>
>>>>> ++++ b/tools/stats-tool.c<br>
>>>>> +@@ -22,7 +22,6 @@<br>
>>>>> + #include <config.h><br>
>>>>> + #endif<br>
>>>>> +<br>
>>>>> +-#define _GNU_SOURCE<br>
>>>>> + #include <sys/mman.h><br>
>>>>> + #include <sys/types.h><br>
>>>>> + #include <sys/stat.h><br>
>>>>> diff --git a/tools/tap-test.c b/tools/tap-test.c<br>
>>>>> -index 57917f5..cb3ee62 100644<br>
>>>>> +index fdc098aa..cb3ee622 100644<br>
>>>>> --- a/tools/tap-test.c<br>
>>>>> +++ b/tools/tap-test.c<br>
>>>>> -@@ -28,7 +28,7 @@<br>
>>>>> +@@ -23,13 +23,12 @@<br>
>>>>> + #include <config.h><br>
>>>>> + #endif<br>
>>>>> +<br>
>>>>> +-#define _GNU_SOURCE<br>
>>>>> + #include <stdio.h><br>
>>>>> + #include <errno.h><br>
>>>>> #include <fcntl.h><br>
>>>>> #include <unistd.h><br>
>>>>> #include <string.h><br>
>>>>> @@ -419,5 +336,30 @@ index 57917f5..cb3ee62 100644<br>
>>>>> #include <sys/ioctl.h><br>
>>>>><br>
>>>>> #include <netinet/in.h><br>
>>>>> +diff --git a/tools/wispr.c b/tools/wispr.c<br>
>>>>> +index d5f9341f..e56dfc16 100644<br>
>>>>> +--- a/tools/wispr.c<br>
>>>>> ++++ b/tools/wispr.c<br>
>>>>> +@@ -23,7 +23,6 @@<br>
>>>>> + #include <config.h><br>
>>>>> + #endif<br>
>>>>> +<br>
>>>>> +-#define _GNU_SOURCE<br>
>>>>> + #include <stdio.h><br>
>>>>> + #include <fcntl.h><br>
>>>>> + #include <unistd.h><br>
>>>>> +diff --git a/vpn/plugins/vpn.c b/vpn/plugins/vpn.c<br>
>>>>> +index 10548aaf..6e3f640c 100644<br>
>>>>> +--- a/vpn/plugins/vpn.c<br>
>>>>> ++++ b/vpn/plugins/vpn.c<br>
>>>>> +@@ -23,7 +23,6 @@<br>
>>>>> + #include <config.h><br>
>>>>> + #endif<br>
>>>>> +<br>
>>>>> +-#define _GNU_SOURCE<br>
>>>>> + #include <string.h><br>
>>>>> + #include <fcntl.h><br>
>>>>> + #include <unistd.h><br>
>>>>> --<br>
>>>>> -2.8.1<br>
>>>>> +2.17.1<br>
>>>>> +<br>
>>>>> diff --git<br>
>>>>> a/meta/recipes-connectivity/<wbr>connman/connman/0001-<wbr>giognutls-Fix-a-crash-using-<wbr>wispr-over-TLS.patch<br>
>>>>> b/meta/recipes-connectivity/<wbr>connman/connman/0001-<wbr>giognutls-Fix-a-crash-using-<wbr>wispr-over-TLS.patch<br>
>>>>> deleted file mode 100644<br>
>>>>> index f9080d4ba9..0000000000<br>
>>>>> ---<br>
>>>>> a/meta/recipes-connectivity/<wbr>connman/connman/0001-<wbr>giognutls-Fix-a-crash-using-<wbr>wispr-over-TLS.patch<br>
>>>>> +++ /dev/null<br>
>>>>> @@ -1,41 +0,0 @@<br>
>>>>> -From 929fc9b7068100444e0ffcccd25841<wbr>f78791e619 Mon Sep 17 00:00:00 2001<br>
>>>>> -From: Jian Liang <<a href="mailto:jianliang@tycoint.com">jianliang@tycoint.com</a>><br>
>>>>> -Date: Fri, 15 Sep 2017 06:40:08 -0400<br>
>>>>> -Subject: [PATCH] gweb: Fix a crash using wispr over TLS<br>
>>>>> -To: <a href="mailto:connman@lists.01.org">connman@lists.01.org</a><br>
>>>>> -Cc: <a href="mailto:wagi@monom.org">wagi@monom.org</a><br>
>>>>> -<br>
>>>>> -When gnutls_channel is instantiated, the gnutls_channel->established<br>
>>>>> -has to be initiated as FALSE. Otherwise, check_handshake function<br>
>>>>> -won't work. A random initial value 1 of gnutls_channel->established<br>
>>>>> -will make check_handshake return G_IO_STATUS_NORMAL, when the channel<br>
>>>>> -is actually not ready to be used. The observed behaviours are,<br>
>>>>> -<br>
>>>>> -- wispr is getting random errors in wispr_portal_web_result<br>
>>>>> -- ConnMan crashes on exit after those random errors<br>
>>>>> -- when wispr is luckly working, ConnMan doesn't crash on exit<br>
>>>>> -<br>
>>>>> -Signed-off-by: Jian Liang <<a href="mailto:jianliang@tycoint.com">jianliang@tycoint.com</a>><br>
>>>>> -<br>
>>>>> ----<br>
>>>>> -Upstream-Status: Backport<br>
>>>>> [<a href="https://git.kernel.org/pub/scm/network/connman/connman.git/commit/?id=73e53f3bd9e7debae86341f1eee7b97862a56a5e" rel="noreferrer" target="_blank">https://git.kernel.org/pub/<wbr>scm/network/connman/connman.<wbr>git/commit/?id=<wbr>73e53f3bd9e7debae86341f1eee7b9<wbr>7862a56a5e</a>]<br>
>>>>> -Signed-off-by: André Draszik <<a href="mailto:andre.draszik@jci.com">andre.draszik@jci.com</a>><br>
>>>>> - gweb/giognutls.c | 2 +-<br>
>>>>> - 1 file changed, 1 insertion(+), 1 deletion(-)<br>
>>>>> -<br>
>>>>> -diff --git a/gweb/giognutls.c b/gweb/giognutls.c<br>
>>>>> -index 09dc9e7..c029a8b 100644<br>
>>>>> ---- a/gweb/giognutls.c<br>
>>>>> -+++ b/gweb/giognutls.c<br>
>>>>> -@@ -421,7 +421,7 @@ GIOChannel *g_io_channel_gnutls_new(int fd)<br>
>>>>> -<br>
>>>>> - DBG("");<br>
>>>>> -<br>
>>>>> -- gnutls_channel = g_new(GIOGnuTLSChannel, 1);<br>
>>>>> -+ gnutls_channel = g_new0(GIOGnuTLSChannel, 1);<br>
>>>>> -<br>
>>>>> - channel = (GIOChannel *) gnutls_channel;<br>
>>>>> -<br>
>>>>> ---<br>
>>>>> -2.7.4<br>
>>>>> -<br>
>>>>> diff --git<br>
>>>>> a/meta/recipes-connectivity/<wbr>connman/connman/0001-inet-Add-<wbr>prefixlen-to-iproute_default_<wbr>function.patch<br>
>>>>> b/meta/recipes-connectivity/<wbr>connman/connman/0001-inet-Add-<wbr>prefixlen-to-iproute_default_<wbr>function.patch<br>
>>>>> deleted file mode 100644<br>
>>>>> index dd7b356741..0000000000<br>
>>>>> ---<br>
>>>>> a/meta/recipes-connectivity/<wbr>connman/connman/0001-inet-Add-<wbr>prefixlen-to-iproute_default_<wbr>function.patch<br>
>>>>> +++ /dev/null<br>
>>>>> @@ -1,63 +0,0 @@<br>
>>>>> -From 508dc60a1f0758ebc586b6b086478a<wbr>176d493086 Mon Sep 17 00:00:00 2001<br>
>>>>> -From: Jian Liang <<a href="mailto:jianliang@tycoint.com">jianliang@tycoint.com</a>><br>
>>>>> -Date: Thu, 5 Oct 2017 09:34:41 +0100<br>
>>>>> -Subject: [PATCH 1/4] inet: Add prefixlen to iproute_default_function<br>
>>>>> -To: <a href="mailto:connman@lists.01.org">connman@lists.01.org</a><br>
>>>>> -Cc: <a href="mailto:wagi@monom.org">wagi@monom.org</a><br>
>>>>> -<br>
>>>>> -Add prefixlen parameter to this function in preparation for using<br>
>>>>> -it also in creating subnet route later, e.g.<br>
>>>>> -<br>
>>>>> -default via 192.168.100.1 dev eth0<br>
>>>>> -<a href="http://192.168.100.0/24" rel="noreferrer" target="_blank">192.168.100.0/24</a> dev eth0<br>
>>>>> -<br>
>>>>> -Signed-off-by: Jian Liang <<a href="mailto:jianliang@tycoint.com">jianliang@tycoint.com</a>><br>
>>>>> -<br>
>>>>> ----<br>
>>>>> -Upstream-Status: Backport<br>
>>>>> [<a href="https://git.kernel.org/pub/scm/network/connman/connman.git/commit/?id=edda5b695de2ee79f02314abc9b46fdd46b388e1" rel="noreferrer" target="_blank">https://git.kernel.org/pub/<wbr>scm/network/connman/connman.<wbr>git/commit/?id=<wbr>edda5b695de2ee79f02314abc9b46f<wbr>dd46b388e1</a>]<br>
>>>>> -Signed-off-by: André Draszik <<a href="mailto:andre.draszik@jci.com">andre.draszik@jci.com</a>><br>
>>>>> - src/inet.c | 7 ++++---<br>
>>>>> - 1 file changed, 4 insertions(+), 3 deletions(-)<br>
>>>>> -<br>
>>>>> -diff --git a/src/inet.c b/src/inet.c<br>
>>>>> -index b887aa0..ab8aec8 100644<br>
>>>>> ---- a/src/inet.c<br>
>>>>> -+++ b/src/inet.c<br>
>>>>> -@@ -2796,7 +2796,7 @@ int __connman_inet_del_fwmark_<wbr>rule(uint32_t<br>
>>>>> table_id, int family, uint32_t fwmar<br>
>>>>> - }<br>
>>>>> -<br>
>>>>> - static int iproute_default_modify(int cmd, uint32_t table_id, int<br>
>>>>> ifindex,<br>
>>>>> -- const char *gateway)<br>
>>>>> -+ const char *gateway, unsigned char prefixlen)<br>
>>>>> - {<br>
>>>>> - struct __connman_inet_rtnl_handle rth;<br>
>>>>> - unsigned char buf[sizeof(struct in6_addr)];<br>
>>>>> -@@ -2829,6 +2829,7 @@ static int iproute_default_modify(int cmd,<br>
>>>>> uint32_t table_id, int ifindex,<br>
>>>>> - rth.req.u.r.rt.rtm_protocol = RTPROT_BOOT;<br>
>>>>> - rth.req.u.r.rt.rtm_scope = RT_SCOPE_UNIVERSE;<br>
>>>>> - rth.req.u.r.rt.rtm_type = RTN_UNICAST;<br>
>>>>> -+ rth.req.u.r.rt.rtm_dst_len = prefixlen;<br>
>>>>> -<br>
>>>>> - __connman_inet_rtnl_addattr_l(<wbr>&rth.req.n, sizeof(rth.req),<br>
>>>>> RTA_GATEWAY,<br>
>>>>> - buf,<br>
>>>>> len);<br>
>>>>> -@@ -2860,7 +2861,7 @@ int __connman_inet_add_default_to_<wbr>table(uint32_t<br>
>>>>> table_id, int ifindex,<br>
>>>>> - {<br>
>>>>> - /* ip route add default via 1.2.3.4 dev wlan0 table 1234 */<br>
>>>>> -<br>
>>>>> -- return iproute_default_modify(RTM_<wbr>NEWROUTE, table_id, ifindex,<br>
>>>>> gateway);<br>
>>>>> -+ return iproute_default_modify(RTM_<wbr>NEWROUTE, table_id, ifindex,<br>
>>>>> gateway, 0);<br>
>>>>> - }<br>
>>>>> -<br>
>>>>> - int __connman_inet_del_default_<wbr>from_table(uint32_t table_id, int<br>
>>>>> ifindex,<br>
>>>>> -@@ -2868,7 +2869,7 @@ int __connman_inet_del_default_<wbr>from_table(uint32_t<br>
>>>>> table_id, int ifindex,<br>
>>>>> - {<br>
>>>>> - /* ip route del default via 1.2.3.4 dev wlan0 table 1234 */<br>
>>>>> -<br>
>>>>> -- return iproute_default_modify(RTM_<wbr>DELROUTE, table_id, ifindex,<br>
>>>>> gateway);<br>
>>>>> -+ return iproute_default_modify(RTM_<wbr>DELROUTE, table_id, ifindex,<br>
>>>>> gateway, 0);<br>
>>>>> - }<br>
>>>>> -<br>
>>>>> - int __connman_inet_get_interface_<wbr>ll_address(int index, int family,<br>
>>>>> ---<br>
>>>>> -2.7.4<br>
>>>>> -<br>
>>>>> diff --git<br>
>>>>> a/meta/recipes-connectivity/<wbr>connman/connman/0001-session-<wbr>Keep-track-of-addr-in-fw_snat-<wbr>session.patch<br>
>>>>> b/meta/recipes-connectivity/<wbr>connman/connman/0001-session-<wbr>Keep-track-of-addr-in-fw_snat-<wbr>session.patch<br>
>>>>> deleted file mode 100644<br>
>>>>> index f1b4d0aaa7..0000000000<br>
>>>>> ---<br>
>>>>> a/meta/recipes-connectivity/<wbr>connman/connman/0001-session-<wbr>Keep-track-of-addr-in-fw_snat-<wbr>session.patch<br>
>>>>> +++ /dev/null<br>
>>>>> @@ -1,112 +0,0 @@<br>
>>>>> -From b5fd5945886fa1845db5c969424b63<wbr>d894fe0376 Mon Sep 17 00:00:00 2001<br>
>>>>> -From: Jian Liang <<a href="mailto:jianliang@tycoint.com">jianliang@tycoint.com</a>><br>
>>>>> -Date: Fri, 25 Aug 2017 10:02:16 -0400<br>
>>>>> -Subject: [PATCH 1/2] session: Keep track of addr in fw_snat & session<br>
>>>>> -To: <a href="mailto:connman@lists.01.org">connman@lists.01.org</a><br>
>>>>> -Cc: <a href="mailto:wagi@monom.org">wagi@monom.org</a><br>
>>>>> -<br>
>>>>> -When there is more than one session in fw_snat's list of sessions,<br>
>>>>> -fw_snat failed to be re-created when update-session-state is triggered<br>
>>>>> -with new IP address. This is because index alone is not sufficient to<br>
>>>>> -decide if fw_snat needs to be re-created. The solution here is to keep<br>
>>>>> -a track of IP addr and use it to avoid false lookup of fw_snat.<br>
>>>>> -<br>
>>>>> -Signed-off-by: Jian Liang <<a href="mailto:jianliang@tycoint.com">jianliang@tycoint.com</a>><br>
>>>>> -<br>
>>>>> ----<br>
>>>>> -Upstream-Status: Backport<br>
>>>>> [<a href="https://git.kernel.org/pub/scm/network/connman/connman.git/commit/?id=f9e27d4abfcab5c80a38e0850b5ddb26277f97c1" rel="noreferrer" target="_blank">https://git.kernel.org/pub/<wbr>scm/network/connman/connman.<wbr>git/commit/?id=<wbr>f9e27d4abfcab5c80a38e0850b5ddb<wbr>26277f97c1</a>]<br>
>>>>> -Signed-off-by: André Draszik <<a href="mailto:andre.draszik@jci.com">andre.draszik@jci.com</a>><br>
>>>>> - src/session.c | 19 +++++++++++++++----<br>
>>>>> - 1 file changed, 15 insertions(+), 4 deletions(-)<br>
>>>>> -<br>
>>>>> -diff --git a/src/session.c b/src/session.c<br>
>>>>> -index 9e3c559..965ac06 100644<br>
>>>>> ---- a/src/session.c<br>
>>>>> -+++ b/src/session.c<br>
>>>>> -@@ -65,6 +65,7 @@ struct connman_session {<br>
>>>>> - struct firewall_context *fw;<br>
>>>>> - uint32_t mark;<br>
>>>>> - int index;<br>
>>>>> -+ char *addr;<br>
>>>>> - char *gateway;<br>
>>>>> - bool policy_routing;<br>
>>>>> - bool snat_enabled;<br>
>>>>> -@@ -79,6 +80,7 @@ struct fw_snat {<br>
>>>>> - GSList *sessions;<br>
>>>>> - int id;<br>
>>>>> - int index;<br>
>>>>> -+ char *addr;<br>
>>>>> - struct firewall_context *fw;<br>
>>>>> - };<br>
>>>>> -<br>
>>>>> -@@ -200,7 +202,7 @@ static char *service2bearer(enum<br>
>>>>> connman_service_type type)<br>
>>>>> - return "";<br>
>>>>> - }<br>
>>>>> -<br>
>>>>> --static struct fw_snat *fw_snat_lookup(int index)<br>
>>>>> -+static struct fw_snat *fw_snat_lookup(int index, const char *addr)<br>
>>>>> - {<br>
>>>>> - struct fw_snat *fw_snat;<br>
>>>>> - GSList *list;<br>
>>>>> -@@ -208,8 +210,11 @@ static struct fw_snat *fw_snat_lookup(int index)<br>
>>>>> - for (list = fw_snat_list; list; list = list->next) {<br>
>>>>> - fw_snat = list->data;<br>
>>>>> -<br>
>>>>> -- if (fw_snat->index == index)<br>
>>>>> -+ if (fw_snat->index == index) {<br>
>>>>> -+ if (g_strcmp0(addr, fw_snat->addr) != 0)<br>
>>>>> -+ continue;<br>
>>>>> - return fw_snat;<br>
>>>>> -+ }<br>
>>>>> - }<br>
>>>>> - return NULL;<br>
>>>>> - }<br>
>>>>> -@@ -224,6 +229,7 @@ static int fw_snat_create(struct connman_session<br>
>>>>> *session,<br>
>>>>> -<br>
>>>>> - fw_snat->fw = __connman_firewall_create();<br>
>>>>> - fw_snat->index = index;<br>
>>>>> -+ fw_snat->addr = g_strdup(addr);<br>
>>>>> -<br>
>>>>> - fw_snat->id = __connman_firewall_enable_<wbr>snat(fw_snat->fw,<br>
>>>>> - index, ifname, addr);<br>
>>>>> -@@ -238,6 +244,7 @@ static int fw_snat_create(struct connman_session<br>
>>>>> *session,<br>
>>>>> - return 0;<br>
>>>>> - err:<br>
>>>>> - __connman_firewall_destroy(fw_<wbr>snat->fw);<br>
>>>>> -+ g_free(fw_snat->addr);<br>
>>>>> - g_free(fw_snat);<br>
>>>>> - return err;<br>
>>>>> - }<br>
>>>>> -@@ -393,7 +400,7 @@ static void del_nat_rules(struct connman_session<br>
>>>>> *session)<br>
>>>>> - return;<br>
>>>>> -<br>
>>>>> - session->snat_enabled = false;<br>
>>>>> -- fw_snat = fw_snat_lookup(session->index)<wbr>;<br>
>>>>> -+ fw_snat = fw_snat_lookup(session->index, session->addr);<br>
>>>>> -<br>
>>>>> - if (!fw_snat)<br>
>>>>> - return;<br>
>>>>> -@@ -420,8 +427,11 @@ static void add_nat_rules(struct connman_session<br>
>>>>> *session)<br>
>>>>> - if (!addr)<br>
>>>>> - return;<br>
>>>>> -<br>
>>>>> -+ g_free(session->addr);<br>
>>>>> -+ session->addr = g_strdup(addr);<br>
>>>>> -+<br>
>>>>> - session->snat_enabled = true;<br>
>>>>> -- fw_snat = fw_snat_lookup(index);<br>
>>>>> -+ fw_snat = fw_snat_lookup(index, session->addr);<br>
>>>>> - if (fw_snat) {<br>
>>>>> - fw_snat_ref(session, fw_snat);<br>
>>>>> - return;<br>
>>>>> -@@ -502,6 +512,7 @@ static void free_session(struct connman_session<br>
>>>>> *session)<br>
>>>>> - g_free(session->info);<br>
>>>>> - g_free(session->info_last);<br>
>>>>> - g_free(session->gateway);<br>
>>>>> -+ g_free(session->addr);<br>
>>>>> -<br>
>>>>> - g_free(session);<br>
>>>>> - }<br>
>>>>> ---<br>
>>>>> -2.7.4<br>
>>>>> -<br>
>>>>> diff --git<br>
>>>>> a/meta/recipes-connectivity/<wbr>connman/connman/0002-inet-<wbr>Implement-subnet-route-<wbr>creation-deletion-in-ipr.patch<br>
>>>>> b/meta/recipes-connectivity/<wbr>connman/connman/0002-inet-<wbr>Implement-subnet-route-<wbr>creation-deletion-in-ipr.patch<br>
>>>>> deleted file mode 100644<br>
>>>>> index 9c953e5d51..0000000000<br>
>>>>> ---<br>
>>>>> a/meta/recipes-connectivity/<wbr>connman/connman/0002-inet-<wbr>Implement-subnet-route-<wbr>creation-deletion-in-ipr.patch<br>
>>>>> +++ /dev/null<br>
>>>>> @@ -1,69 +0,0 @@<br>
>>>>> -From 08cda4004491d3971a8b9df937426c<wbr>43800d15b1 Mon Sep 17 00:00:00 2001<br>
>>>>> -From: Jian Liang <<a href="mailto:jianliang@tycoint.com">jianliang@tycoint.com</a>><br>
>>>>> -Date: Thu, 5 Oct 2017 09:37:06 +0100<br>
>>>>> -Subject: [PATCH 2/4] inet: Implement subnet route creation/deletion in<br>
>>>>> - iproute_default_modify<br>
>>>>> -To: <a href="mailto:connman@lists.01.org">connman@lists.01.org</a><br>
>>>>> -Cc: <a href="mailto:wagi@monom.org">wagi@monom.org</a><br>
>>>>> -<br>
>>>>> -- Calculate subnet address base on gateway address and prefixlen<br>
>>>>> -- Differentiate creation of routes to gateway and subnet<br>
>>>>> -<br>
>>>>> -Signed-off-by: Jian Liang <<a href="mailto:jianliang@tycoint.com">jianliang@tycoint.com</a>><br>
>>>>> -<br>
>>>>> ----<br>
>>>>> -Upstream-Status: Backport<br>
>>>>> [<a href="https://git.kernel.org/pub/scm/network/connman/connman.git/commit/?id=ff7dcf91f12a2a237feebc6e606d0a8e92975528" rel="noreferrer" target="_blank">https://git.kernel.org/pub/<wbr>scm/network/connman/connman.<wbr>git/commit/?id=<wbr>ff7dcf91f12a2a237feebc6e606d0a<wbr>8e92975528</a>]<br>
>>>>> -Signed-off-by: André Draszik <<a href="mailto:andre.draszik@jci.com">andre.draszik@jci.com</a>><br>
>>>>> - src/inet.c | 22 +++++++++++++++++++---<br>
>>>>> - 1 file changed, 19 insertions(+), 3 deletions(-)<br>
>>>>> -<br>
>>>>> -diff --git a/src/inet.c b/src/inet.c<br>
>>>>> -index ab8aec8..0ddb030 100644<br>
>>>>> ---- a/src/inet.c<br>
>>>>> -+++ b/src/inet.c<br>
>>>>> -@@ -2802,6 +2802,9 @@ static int iproute_default_modify(int cmd,<br>
>>>>> uint32_t table_id, int ifindex,<br>
>>>>> - unsigned char buf[sizeof(struct in6_addr)];<br>
>>>>> - int ret, len;<br>
>>>>> - int family = connman_inet_check_ipaddress(<wbr>gateway);<br>
>>>>> -+ char *dst = NULL;<br>
>>>>> -+<br>
>>>>> -+ DBG("gateway %s/%u table %u", gateway, prefixlen, table_id);<br>
>>>>> -<br>
>>>>> - switch (family) {<br>
>>>>> - case AF_INET:<br>
>>>>> -@@ -2814,7 +2817,19 @@ static int iproute_default_modify(int cmd,<br>
>>>>> uint32_t table_id, int ifindex,<br>
>>>>> - return -EINVAL;<br>
>>>>> - }<br>
>>>>> -<br>
>>>>> -- ret = inet_pton(family, gateway, buf);<br>
>>>>> -+ if (prefixlen) {<br>
>>>>> -+ struct in_addr ipv4_subnet_addr, ipv4_mask;<br>
>>>>> -+<br>
>>>>> -+ memset(&ipv4_subnet_addr, 0, sizeof(ipv4_subnet_addr));<br>
>>>>> -+ ipv4_mask.s_addr = htonl((0xffffffff << (32 - prefixlen))<br>
>>>>> & 0xffffffff);<br>
>>>>> -+ ipv4_subnet_addr.s_addr = inet_addr(gateway);<br>
>>>>> -+ ipv4_subnet_addr.s_addr &= ipv4_mask.s_addr;<br>
>>>>> -+<br>
>>>>> -+ dst = g_strdup(inet_ntoa(ipv4_<wbr>subnet_addr));<br>
>>>>> -+ }<br>
>>>>> -+<br>
>>>>> -+ ret = inet_pton(family, dst ? dst : gateway, buf);<br>
>>>>> -+ g_free(dst);<br>
>>>>> - if (ret <= 0)<br>
>>>>> - return -EINVAL;<br>
>>>>> -<br>
>>>>> -@@ -2831,8 +2846,9 @@ static int iproute_default_modify(int cmd,<br>
>>>>> uint32_t table_id, int ifindex,<br>
>>>>> - rth.req.u.r.rt.rtm_type = RTN_UNICAST;<br>
>>>>> - rth.req.u.r.rt.rtm_dst_len = prefixlen;<br>
>>>>> -<br>
>>>>> -- __connman_inet_rtnl_addattr_l(<wbr>&rth.req.n, sizeof(rth.req),<br>
>>>>> RTA_GATEWAY,<br>
>>>>> -- buf,<br>
>>>>> len);<br>
>>>>> -+ __connman_inet_rtnl_addattr_l(<wbr>&rth.req.n, sizeof(rth.req),<br>
>>>>> -+ prefixlen > 0 ? RTA_DST : RTA_GATEWAY, buf, len);<br>
>>>>> -+<br>
>>>>> - if (table_id < 256) {<br>
>>>>> - rth.req.u.r.rt.rtm_table = table_id;<br>
>>>>> - } else {<br>
>>>>> ---<br>
>>>>> -2.7.4<br>
>>>>> -<br>
>>>>> diff --git<br>
>>>>> a/meta/recipes-connectivity/<wbr>connman/connman/0003-inet-<wbr>Implement-APIs-for-creating-<wbr>and-deleting-subnet.patch<br>
>>>>> b/meta/recipes-connectivity/<wbr>connman/connman/0003-inet-<wbr>Implement-APIs-for-creating-<wbr>and-deleting-subnet.patch<br>
>>>>> deleted file mode 100644<br>
>>>>> index 56ba5c3f4b..0000000000<br>
>>>>> ---<br>
>>>>> a/meta/recipes-connectivity/<wbr>connman/connman/0003-inet-<wbr>Implement-APIs-for-creating-<wbr>and-deleting-subnet.patch<br>
>>>>> +++ /dev/null<br>
>>>>> @@ -1,68 +0,0 @@<br>
>>>>> -From a9243f13d6e1aadd69bfcc27f75f69<wbr>c38be51677 Mon Sep 17 00:00:00 2001<br>
>>>>> -From: Jian Liang <<a href="mailto:jianliang@tycoint.com">jianliang@tycoint.com</a>><br>
>>>>> -Date: Wed, 4 Oct 2017 17:30:17 +0100<br>
>>>>> -Subject: [PATCH 3/4] inet: Implement APIs for creating and deleting<br>
>>>>> subnet<br>
>>>>> - route<br>
>>>>> -To: <a href="mailto:connman@lists.01.org">connman@lists.01.org</a><br>
>>>>> -Cc: <a href="mailto:wagi@monom.org">wagi@monom.org</a><br>
>>>>> -<br>
>>>>> -Signed-off-by: Jian Liang <<a href="mailto:jianliang@tycoint.com">jianliang@tycoint.com</a>><br>
>>>>> -<br>
>>>>> ----<br>
>>>>> -Upstream-Status: Backport<br>
>>>>> [<a href="https://git.kernel.org/pub/scm/network/connman/connman.git/commit/?id=3a15b0b7fccd053aff91da2cc68585509d0c509b" rel="noreferrer" target="_blank">https://git.kernel.org/pub/<wbr>scm/network/connman/connman.<wbr>git/commit/?id=<wbr>3a15b0b7fccd053aff91da2cc68585<wbr>509d0c509b</a>]<br>
>>>>> -Signed-off-by: André Draszik <<a href="mailto:andre.draszik@jci.com">andre.draszik@jci.com</a>><br>
>>>>> - src/connman.h | 4 ++++<br>
>>>>> - src/inet.c | 14 ++++++++++++++<br>
>>>>> - 2 files changed, 18 insertions(+)<br>
>>>>> -<br>
>>>>> -diff --git a/src/connman.h b/src/connman.h<br>
>>>>> -index 21b7080..da4446a 100644<br>
>>>>> ---- a/src/connman.h<br>
>>>>> -+++ b/src/connman.h<br>
>>>>> -@@ -240,7 +240,11 @@ int __connman_inet_rtnl_addattr32(<wbr>struct nlmsghdr<br>
>>>>> *n, size_t maxlen,<br>
>>>>> - int __connman_inet_add_fwmark_<wbr>rule(uint32_t table_id, int family,<br>
>>>>> uint32_t fwmark);<br>
>>>>> - int __connman_inet_del_fwmark_<wbr>rule(uint32_t table_id, int family,<br>
>>>>> uint32_t fwmark);<br>
>>>>> - int __connman_inet_add_default_to_<wbr>table(uint32_t table_id, int ifindex,<br>
>>>>> const char *gateway);<br>
>>>>> -+int __connman_inet_add_subnet_to_<wbr>table(uint32_t table_id, int ifindex,<br>
>>>>> -+ const char *gateway, unsigned char prefixlen);<br>
>>>>> - int __connman_inet_del_default_<wbr>from_table(uint32_t table_id, int<br>
>>>>> ifindex, const char *gateway);<br>
>>>>> -+int __connman_inet_del_subnet_<wbr>from_table(uint32_t table_id, int<br>
>>>>> ifindex,<br>
>>>>> -+ const char *gateway, unsigned char prefixlen);<br>
>>>>> - int __connman_inet_get_address_<wbr>netmask(int ifindex,<br>
>>>>> - struct sockaddr_in *address, struct sockaddr_in<br>
>>>>> *netmask);<br>
>>>>> -<br>
>>>>> -diff --git a/src/inet.c b/src/inet.c<br>
>>>>> -index 0ddb030..dcd1ab2 100644<br>
>>>>> ---- a/src/inet.c<br>
>>>>> -+++ b/src/inet.c<br>
>>>>> -@@ -2880,6 +2880,13 @@ int __connman_inet_add_default_to_<wbr>table(uint32_t<br>
>>>>> table_id, int ifindex,<br>
>>>>> - return iproute_default_modify(RTM_<wbr>NEWROUTE, table_id, ifindex,<br>
>>>>> gateway, 0);<br>
>>>>> - }<br>
>>>>> -<br>
>>>>> -+int __connman_inet_add_subnet_to_<wbr>table(uint32_t table_id, int ifindex,<br>
>>>>> -+ const char *gateway,<br>
>>>>> unsigned char prefixlen)<br>
>>>>> -+{<br>
>>>>> -+ /* ip route add <a href="http://1.2.3.4/24" rel="noreferrer" target="_blank">1.2.3.4/24</a> dev eth0 table 1234 */<br>
>>>>> -+ return iproute_default_modify(RTM_<wbr>NEWROUTE, table_id, ifindex,<br>
>>>>> gateway, prefixlen);<br>
>>>>> -+}<br>
>>>>> -+<br>
>>>>> - int __connman_inet_del_default_<wbr>from_table(uint32_t table_id, int<br>
>>>>> ifindex,<br>
>>>>> - const char *gateway)<br>
>>>>> - {<br>
>>>>> -@@ -2888,6 +2895,13 @@ int<br>
>>>>> __connman_inet_del_default_<wbr>from_table(uint32_t table_id, int ifindex,<br>
>>>>> - return iproute_default_modify(RTM_<wbr>DELROUTE, table_id, ifindex,<br>
>>>>> gateway, 0);<br>
>>>>> - }<br>
>>>>> -<br>
>>>>> -+int __connman_inet_del_subnet_<wbr>from_table(uint32_t table_id, int<br>
>>>>> ifindex,<br>
>>>>> -+ const char *gateway,<br>
>>>>> unsigned char prefixlen)<br>
>>>>> -+{<br>
>>>>> -+ /* ip route del <a href="http://1.2.3.4/24" rel="noreferrer" target="_blank">1.2.3.4/24</a> dev eth0 table 1234 */<br>
>>>>> -+ return iproute_default_modify(RTM_<wbr>DELROUTE, table_id, ifindex,<br>
>>>>> gateway, prefixlen);<br>
>>>>> -+}<br>
>>>>> -+<br>
>>>>> - int __connman_inet_get_interface_<wbr>ll_address(int index, int family,<br>
>>>>> - void<br>
>>>>> *address)<br>
>>>>> - {<br>
>>>>> ---<br>
>>>>> -2.7.4<br>
>>>>> -<br>
>>>>> diff --git<br>
>>>>> a/meta/recipes-connectivity/<wbr>connman/connman/0004-session-<wbr>Use-subnet-route-creation-and-<wbr>deletion-APIs.patch<br>
>>>>> b/meta/recipes-connectivity/<wbr>connman/connman/0004-session-<wbr>Use-subnet-route-creation-and-<wbr>deletion-APIs.patch<br>
>>>>> deleted file mode 100644<br>
>>>>> index ca213eb18b..0000000000<br>
>>>>> ---<br>
>>>>> a/meta/recipes-connectivity/<wbr>connman/connman/0004-session-<wbr>Use-subnet-route-creation-and-<wbr>deletion-APIs.patch<br>
>>>>> +++ /dev/null<br>
>>>>> @@ -1,77 +0,0 @@<br>
>>>>> -From deb9372db8396da4f7cd20555ce7c9<wbr>a8b3ad96bd Mon Sep 17 00:00:00 2001<br>
>>>>> -From: Jian Liang <<a href="mailto:jianliang@tycoint.com">jianliang@tycoint.com</a>><br>
>>>>> -Date: Fri, 6 Oct 2017 11:40:16 +0100<br>
>>>>> -Subject: [PATCH 4/4] session: Use subnet route creation and deletion<br>
>>>>> APIs<br>
>>>>> -To: <a href="mailto:connman@lists.01.org">connman@lists.01.org</a><br>
>>>>> -Cc: <a href="mailto:wagi@monom.org">wagi@monom.org</a><br>
>>>>> -<br>
>>>>> -As subnet route is address and session specific in this case, so add<br>
>>>>> -prefixlen into struct connman_session, and update it along with<br>
>>>>> ipconfig.<br>
>>>>> -Then use it in subnet route related APIs.<br>
>>>>> -<br>
>>>>> -Signed-off-by: Jian Liang <<a href="mailto:jianliang@tycoint.com">jianliang@tycoint.com</a>><br>
>>>>> -<br>
>>>>> ----<br>
>>>>> -Upstream-Status: Backport<br>
>>>>> [<a href="https://git.kernel.org/pub/scm/network/connman/connman.git/commit/?id=285f25ef6cc9e4a43dab83523f3e2eab4365ac26" rel="noreferrer" target="_blank">https://git.kernel.org/pub/<wbr>scm/network/connman/connman.<wbr>git/commit/?id=<wbr>285f25ef6cc9e4a43dab83523f3e2e<wbr>ab4365ac26</a>]<br>
>>>>> -Signed-off-by: André Draszik <<a href="mailto:andre.draszik@jci.com">andre.draszik@jci.com</a>><br>
>>>>> - src/session.c | 20 ++++++++++++++++----<br>
>>>>> - 1 file changed, 16 insertions(+), 4 deletions(-)<br>
>>>>> -<br>
>>>>> -diff --git a/src/session.c b/src/session.c<br>
>>>>> -index 965ac06..7b7a14b 100644<br>
>>>>> ---- a/src/session.c<br>
>>>>> -+++ b/src/session.c<br>
>>>>> -@@ -67,6 +67,7 @@ struct connman_session {<br>
>>>>> - int index;<br>
>>>>> - char *addr;<br>
>>>>> - char *gateway;<br>
>>>>> -+ unsigned char prefixlen;<br>
>>>>> - bool policy_routing;<br>
>>>>> - bool snat_enabled;<br>
>>>>> - };<br>
>>>>> -@@ -357,13 +358,17 @@ static void del_default_route(struct<br>
>>>>> connman_session *session)<br>
>>>>> - if (!session->gateway)<br>
>>>>> - return;<br>
>>>>> -<br>
>>>>> -- DBG("index %d routing table %d default gateway %s",<br>
>>>>> -- session->index, session->mark, session->gateway);<br>
>>>>> -+ DBG("index %d routing table %d default gateway %s/%u",<br>
>>>>> -+ session->index, session->mark, session->gateway,<br>
>>>>> session->prefixlen);<br>
>>>>> -+<br>
>>>>> -+ __connman_inet_del_subnet_<wbr>from_table(session->mark,<br>
>>>>> -+ session->index, session->gateway,<br>
>>>>> session->prefixlen);<br>
>>>>> -<br>
>>>>> - __connman_inet_del_default_<wbr>from_table(session->mark,<br>
>>>>> - session->index,<br>
>>>>> session->gateway);<br>
>>>>> - g_free(session->gateway);<br>
>>>>> - session->gateway = NULL;<br>
>>>>> -+ session->prefixlen = 0;<br>
>>>>> - session->index = -1;<br>
>>>>> - }<br>
>>>>> -<br>
>>>>> -@@ -383,13 +388,20 @@ static void add_default_route(struct<br>
>>>>> connman_session *session)<br>
>>>>> - if (!session->gateway)<br>
>>>>> - session->gateway = g_strdup(inet_ntoa(addr));<br>
>>>>> -<br>
>>>>> -- DBG("index %d routing table %d default gateway %s",<br>
>>>>> -- session->index, session->mark, session->gateway);<br>
>>>>> -+ session->prefixlen = __connman_ipconfig_get_<wbr>prefixlen(ipconfig);<br>
>>>>> -+<br>
>>>>> -+ DBG("index %d routing table %d default gateway %s/%u",<br>
>>>>> -+ session->index, session->mark, session->gateway,<br>
>>>>> session->prefixlen);<br>
>>>>> -<br>
>>>>> - err = __connman_inet_add_default_to_<wbr>table(session->mark,<br>
>>>>> - session->index,<br>
>>>>> session->gateway);<br>
>>>>> - if (err < 0)<br>
>>>>> - DBG("session %p %s", session, strerror(-err));<br>
>>>>> -+<br>
>>>>> -+ err = __connman_inet_add_subnet_to_<wbr>table(session->mark,<br>
>>>>> -+ session->index, session->gateway,<br>
>>>>> session->prefixlen);<br>
>>>>> -+ if (err < 0)<br>
>>>>> -+ DBG("session add subnet route %p %s", session,<br>
>>>>> strerror(-err));<br>
>>>>> - }<br>
>>>>> -<br>
>>>>> - static void del_nat_rules(struct connman_session *session)<br>
>>>>> ---<br>
>>>>> -2.7.4<br>
>>>>> -<br>
>>>>> diff --git a/meta/recipes-connectivity/<wbr>connman/<a href="http://connman_1.35.bb" rel="noreferrer" target="_blank">connman_1.35.bb</a><br>
>>>>> b/meta/recipes-connectivity/<wbr>connman/<a href="http://connman_1.35.bb" rel="noreferrer" target="_blank">connman_1.35.bb</a><br>
>>>>> deleted file mode 100644<br>
>>>>> index ff2118113f..0000000000<br>
>>>>> --- a/meta/recipes-connectivity/<wbr>connman/<a href="http://connman_1.35.bb" rel="noreferrer" target="_blank">connman_1.35.bb</a><br>
>>>>> +++ /dev/null<br>
>>>>> @@ -1,22 +0,0 @@<br>
>>>>> -require connman.inc<br>
>>>>> -<br>
>>>>> -SRC_URI = "${KERNELORG_MIRROR}/linux/<wbr>network/${BPN}/${BP}.tar.xz \<br>
>>>>> -<br>
>>>>> file://0001-plugin.h-Change-<wbr>visibility-to-default-for-<wbr>debug-symb.patch \<br>
>>>>> -<br>
>>>>> file://0001-connman.service-<wbr>stop-systemd-resolved-when-we-<wbr>use-co.patch \<br>
>>>>> - file://connman \<br>
>>>>> - file://no-version-scripts.<wbr>patch \<br>
>>>>> - file://includes.patch \<br>
>>>>> -<br>
>>>>> file://0001-session-Keep-<wbr>track-of-addr-in-fw_snat-<wbr>session.patch \<br>
>>>>> - file://0001-giognutls-Fix-a-<wbr>crash-using-wispr-over-TLS.<wbr>patch<br>
>>>>> \<br>
>>>>> -<br>
>>>>> file://0001-inet-Add-<wbr>prefixlen-to-iproute_default_<wbr>function.patch \<br>
>>>>> -<br>
>>>>> file://0002-inet-Implement-<wbr>subnet-route-creation-<wbr>deletion-in-ipr.patch \<br>
>>>>> -<br>
>>>>> file://0003-inet-Implement-<wbr>APIs-for-creating-and-<wbr>deleting-subnet.patch \<br>
>>>>> -<br>
>>>>> file://0004-session-Use-<wbr>subnet-route-creation-and-<wbr>deletion-APIs.patch \<br>
>>>>> - "<br>
>>>>> -SRC_URI_append_libc-musl = "<br>
>>>>> file://0002-resolve-musl-does-<wbr>not-implement-res_ninit.patch \<br>
>>>>> - "<br>
>>>>> -<br>
>>>>> -SRC_URI[md5sum] = "<wbr>bae37b45ee9b3db5ec8115188f8a76<wbr>52"<br>
>>>>> -SRC_URI[sha256sum] =<br>
>>>>> "<wbr>66d7deb98371545c6e417239a9b3b3<wbr>e3201c1529d08eedf40afbc859842c<wbr>f2aa"<br>
>>>>> -<br>
>>>>> -RRECOMMENDS_${PN} = "connman-conf"<br>
>>>>> diff --git a/meta/recipes-connectivity/<wbr>connman/<a href="http://connman_1.36.bb" rel="noreferrer" target="_blank">connman_1.36.bb</a><br>
>>>>> b/meta/recipes-connectivity/<wbr>connman/<a href="http://connman_1.36.bb" rel="noreferrer" target="_blank">connman_1.36.bb</a><br>
>>>>> new file mode 100644<br>
>>>>> index 0000000000..62c89b1e5d<br>
>>>>> --- /dev/null<br>
>>>>> +++ b/meta/recipes-connectivity/<wbr>connman/<a href="http://connman_1.36.bb" rel="noreferrer" target="_blank">connman_1.36.bb</a><br>
>>>>> @@ -0,0 +1,17 @@<br>
>>>>> +require connman.inc<br>
>>>>> +<br>
>>>>> +SRC_URI = "${KERNELORG_MIRROR}/linux/<wbr>network/${BPN}/${BP}.tar.xz \<br>
>>>>> +<br>
>>>>> file://0001-plugin.h-Change-<wbr>visibility-to-default-for-<wbr>debug-symb.patch \<br>
>>>>> +<br>
>>>>> file://0001-connman.service-<wbr>stop-systemd-resolved-when-we-<wbr>use-co.patch \<br>
>>>>> + file://connman \<br>
>>>>> + file://no-version-scripts.<wbr>patch \<br>
>>>>> + file://0001-Use-AC_USE_SYSTEM_<wbr>EXTENSIONS.patch \<br>
>>>>> +"<br>
>>>>> +<br>
>>>>> +SRC_URI_append_libc-musl = "<br>
>>>>> file://0002-resolve-musl-does-<wbr>not-implement-res_ninit.patch \<br>
>>>>> +"<br>
>>>>> +<br>
>>>>> +SRC_URI[md5sum] = "<wbr>dae77d9c904d2c223ae849e32079d5<wbr>7e"<br>
>>>>> +SRC_URI[sha256sum] =<br>
>>>>> "<wbr>c789db41cc443fa41e661217ea3214<wbr>92ad59a004bebcd1aa013f3bc10a6e<wbr>0074"<br>
>>>>> +<br>
>>>>> +RRECOMMENDS_${PN} = "connman-conf"<br>
>>>>> --<br>
>>>>> 2.17.1<br>
>>>>><br>
>>>>> --<br>
>>>>> ______________________________<wbr>_________________<br>
>>>>> Openembedded-core mailing list<br>
>>>>> <a href="mailto:Openembedded-core@lists.openembedded.org">Openembedded-core@lists.<wbr>openembedded.org</a><br>
>>>>> <a href="http://lists.openembedded.org/mailman/listinfo/openembedded-core" rel="noreferrer" target="_blank">http://lists.openembedded.org/<wbr>mailman/listinfo/openembedded-<wbr>core</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div>Oleksandr Kravchuk</div><div><a href="http://oleksandr-kravchuk.com/" target="_blank">http://oleksandr-kravchuk.com/</a></div></div>
</div>