diff options
author | Olekandr Kravchuk <dev@sashko.rv.ua> | 2018-10-08 23:05:51 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-11-14 11:14:39 +0000 |
commit | dc804276ef79bee3818deb1a6586ba65cc7b4a3a (patch) | |
tree | ce9760371409a5d0d6510f968a8ce7866f23f1a2 /meta/recipes-connectivity/connman/connman/0002-inet-Implement-subnet-route-creation-deletion-in-ipr.patch | |
parent | 0cbda4a42e18b326bc74d045f435c02de59822fb (diff) | |
download | poky-dc804276ef79bee3818deb1a6586ba65cc7b4a3a.tar.gz |
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 <dev@sashko.rv.ua>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-connectivity/connman/connman/0002-inet-Implement-subnet-route-creation-deletion-in-ipr.patch')
-rw-r--r-- | meta/recipes-connectivity/connman/connman/0002-inet-Implement-subnet-route-creation-deletion-in-ipr.patch | 69 |
1 files changed, 0 insertions, 69 deletions
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 @@ | |||
1 | From 08cda4004491d3971a8b9df937426c43800d15b1 Mon Sep 17 00:00:00 2001 | ||
2 | From: Jian Liang <jianliang@tycoint.com> | ||
3 | Date: Thu, 5 Oct 2017 09:37:06 +0100 | ||
4 | Subject: [PATCH 2/4] inet: Implement subnet route creation/deletion in | ||
5 | iproute_default_modify | ||
6 | To: connman@lists.01.org | ||
7 | Cc: wagi@monom.org | ||
8 | |||
9 | - Calculate subnet address base on gateway address and prefixlen | ||
10 | - Differentiate creation of routes to gateway and subnet | ||
11 | |||
12 | Signed-off-by: Jian Liang <jianliang@tycoint.com> | ||
13 | |||
14 | --- | ||
15 | Upstream-Status: Backport [https://git.kernel.org/pub/scm/network/connman/connman.git/commit/?id=ff7dcf91f12a2a237feebc6e606d0a8e92975528] | ||
16 | Signed-off-by: André Draszik <andre.draszik@jci.com> | ||
17 | src/inet.c | 22 +++++++++++++++++++--- | ||
18 | 1 file changed, 19 insertions(+), 3 deletions(-) | ||
19 | |||
20 | diff --git a/src/inet.c b/src/inet.c | ||
21 | index ab8aec8..0ddb030 100644 | ||
22 | --- a/src/inet.c | ||
23 | +++ b/src/inet.c | ||
24 | @@ -2802,6 +2802,9 @@ static int iproute_default_modify(int cmd, uint32_t table_id, int ifindex, | ||
25 | unsigned char buf[sizeof(struct in6_addr)]; | ||
26 | int ret, len; | ||
27 | int family = connman_inet_check_ipaddress(gateway); | ||
28 | + char *dst = NULL; | ||
29 | + | ||
30 | + DBG("gateway %s/%u table %u", gateway, prefixlen, table_id); | ||
31 | |||
32 | switch (family) { | ||
33 | case AF_INET: | ||
34 | @@ -2814,7 +2817,19 @@ static int iproute_default_modify(int cmd, uint32_t table_id, int ifindex, | ||
35 | return -EINVAL; | ||
36 | } | ||
37 | |||
38 | - ret = inet_pton(family, gateway, buf); | ||
39 | + if (prefixlen) { | ||
40 | + struct in_addr ipv4_subnet_addr, ipv4_mask; | ||
41 | + | ||
42 | + memset(&ipv4_subnet_addr, 0, sizeof(ipv4_subnet_addr)); | ||
43 | + ipv4_mask.s_addr = htonl((0xffffffff << (32 - prefixlen)) & 0xffffffff); | ||
44 | + ipv4_subnet_addr.s_addr = inet_addr(gateway); | ||
45 | + ipv4_subnet_addr.s_addr &= ipv4_mask.s_addr; | ||
46 | + | ||
47 | + dst = g_strdup(inet_ntoa(ipv4_subnet_addr)); | ||
48 | + } | ||
49 | + | ||
50 | + ret = inet_pton(family, dst ? dst : gateway, buf); | ||
51 | + g_free(dst); | ||
52 | if (ret <= 0) | ||
53 | return -EINVAL; | ||
54 | |||
55 | @@ -2831,8 +2846,9 @@ static int iproute_default_modify(int cmd, uint32_t table_id, int ifindex, | ||
56 | rth.req.u.r.rt.rtm_type = RTN_UNICAST; | ||
57 | rth.req.u.r.rt.rtm_dst_len = prefixlen; | ||
58 | |||
59 | - __connman_inet_rtnl_addattr_l(&rth.req.n, sizeof(rth.req), RTA_GATEWAY, | ||
60 | - buf, len); | ||
61 | + __connman_inet_rtnl_addattr_l(&rth.req.n, sizeof(rth.req), | ||
62 | + prefixlen > 0 ? RTA_DST : RTA_GATEWAY, buf, len); | ||
63 | + | ||
64 | if (table_id < 256) { | ||
65 | rth.req.u.r.rt.rtm_table = table_id; | ||
66 | } else { | ||
67 | -- | ||
68 | 2.7.4 | ||
69 | |||