From dc804276ef79bee3818deb1a6586ba65cc7b4a3a Mon Sep 17 00:00:00 2001 From: Olekandr Kravchuk Date: Mon, 8 Oct 2018 23:05:51 +0200 Subject: connman: update to 1.36 - updated connman to v1.36 - removed mainstreamed patches - includes.patch has been rabased and transformed into git format (From OE-Core rev: 85b76e52d2060e197435606eb6316c8833b46361) Signed-off-by: Oleksandr Kravchuk Signed-off-by: Richard Purdie --- ...ent-subnet-route-creation-deletion-in-ipr.patch | 69 ---------------------- 1 file changed, 69 deletions(-) delete mode 100644 meta/recipes-connectivity/connman/connman/0002-inet-Implement-subnet-route-creation-deletion-in-ipr.patch (limited to 'meta/recipes-connectivity/connman/connman/0002-inet-Implement-subnet-route-creation-deletion-in-ipr.patch') diff --git a/meta/recipes-connectivity/connman/connman/0002-inet-Implement-subnet-route-creation-deletion-in-ipr.patch b/meta/recipes-connectivity/connman/connman/0002-inet-Implement-subnet-route-creation-deletion-in-ipr.patch deleted file mode 100644 index 9c953e5d51..0000000000 --- a/meta/recipes-connectivity/connman/connman/0002-inet-Implement-subnet-route-creation-deletion-in-ipr.patch +++ /dev/null @@ -1,69 +0,0 @@ -From 08cda4004491d3971a8b9df937426c43800d15b1 Mon Sep 17 00:00:00 2001 -From: Jian Liang -Date: Thu, 5 Oct 2017 09:37:06 +0100 -Subject: [PATCH 2/4] inet: Implement subnet route creation/deletion in - iproute_default_modify -To: connman@lists.01.org -Cc: wagi@monom.org - -- Calculate subnet address base on gateway address and prefixlen -- Differentiate creation of routes to gateway and subnet - -Signed-off-by: Jian Liang - ---- -Upstream-Status: Backport [https://git.kernel.org/pub/scm/network/connman/connman.git/commit/?id=ff7dcf91f12a2a237feebc6e606d0a8e92975528] -Signed-off-by: André Draszik - src/inet.c | 22 +++++++++++++++++++--- - 1 file changed, 19 insertions(+), 3 deletions(-) - -diff --git a/src/inet.c b/src/inet.c -index ab8aec8..0ddb030 100644 ---- a/src/inet.c -+++ b/src/inet.c -@@ -2802,6 +2802,9 @@ static int iproute_default_modify(int cmd, uint32_t table_id, int ifindex, - unsigned char buf[sizeof(struct in6_addr)]; - int ret, len; - int family = connman_inet_check_ipaddress(gateway); -+ char *dst = NULL; -+ -+ DBG("gateway %s/%u table %u", gateway, prefixlen, table_id); - - switch (family) { - case AF_INET: -@@ -2814,7 +2817,19 @@ static int iproute_default_modify(int cmd, uint32_t table_id, int ifindex, - return -EINVAL; - } - -- ret = inet_pton(family, gateway, buf); -+ if (prefixlen) { -+ struct in_addr ipv4_subnet_addr, ipv4_mask; -+ -+ memset(&ipv4_subnet_addr, 0, sizeof(ipv4_subnet_addr)); -+ ipv4_mask.s_addr = htonl((0xffffffff << (32 - prefixlen)) & 0xffffffff); -+ ipv4_subnet_addr.s_addr = inet_addr(gateway); -+ ipv4_subnet_addr.s_addr &= ipv4_mask.s_addr; -+ -+ dst = g_strdup(inet_ntoa(ipv4_subnet_addr)); -+ } -+ -+ ret = inet_pton(family, dst ? dst : gateway, buf); -+ g_free(dst); - if (ret <= 0) - return -EINVAL; - -@@ -2831,8 +2846,9 @@ static int iproute_default_modify(int cmd, uint32_t table_id, int ifindex, - rth.req.u.r.rt.rtm_type = RTN_UNICAST; - rth.req.u.r.rt.rtm_dst_len = prefixlen; - -- __connman_inet_rtnl_addattr_l(&rth.req.n, sizeof(rth.req), RTA_GATEWAY, -- buf, len); -+ __connman_inet_rtnl_addattr_l(&rth.req.n, sizeof(rth.req), -+ prefixlen > 0 ? RTA_DST : RTA_GATEWAY, buf, len); -+ - if (table_id < 256) { - rth.req.u.r.rt.rtm_table = table_id; - } else { --- -2.7.4 - -- cgit v1.2.3-54-g00ecf