Merge pull request #3388 from MilhouseVH/le10_connman_1.37

connman: update to connman-1.37
This commit is contained in:
Christian Hewitt 2019-03-29 20:06:43 +04:00 committed by GitHub
commit a244f9d5d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 128 deletions

View File

@ -1,9 +1,10 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)
# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)
PKG_NAME="connman"
PKG_VERSION="1.36"
PKG_SHA256="c789db41cc443fa41e661217ea321492ad59a004bebcd1aa013f3bc10a6e0074"
PKG_VERSION="1.37"
PKG_SHA256="6ce29b3eb0bb16a7387bc609c39455fd13064bdcde5a4d185fab3a0c71946e16"
PKG_LICENSE="GPL"
PKG_SITE="http://www.connman.net"
PKG_URL="https://www.kernel.org/pub/linux/network/connman/$PKG_NAME-$PKG_VERSION.tar.xz"

View File

@ -1,76 +0,0 @@
From b5e589fc385a2d4a62c6d91cefe6ad1b6bd9fa68 Mon Sep 17 00:00:00 2001
From: Chris Novakovic <chris@chrisn.me.uk>
Date: Sun, 8 Jul 2018 00:59:05 +0100
Subject: [PATCH] main: Add UseGatewaysAsTimeservers option
Add support for a new boolean option UseGatewaysAsTimeservers to the
[General] section of main.conf.
This is upstream commit 20f2041 backported for ConnMan 1.36.
---
src/main.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/src/main.c b/src/main.c
index 318bf02..ad8595e 100644
--- a/src/main.c
+++ b/src/main.c
@@ -81,6 +81,7 @@ static struct {
char *vendor_class_id;
bool enable_online_check;
bool auto_connect_roaming_services;
+ bool use_gateways_as_timeservers;
} connman_settings = {
.bg_scan = true,
.pref_timeservers = NULL,
@@ -100,6 +101,7 @@ static struct {
.vendor_class_id = NULL,
.enable_online_check = true,
.auto_connect_roaming_services = false,
+ .use_gateways_as_timeservers = false,
};
#define CONF_BG_SCAN "BackgroundScanning"
@@ -120,6 +122,7 @@ static struct {
#define CONF_VENDOR_CLASS_ID "VendorClassID"
#define CONF_ENABLE_ONLINE_CHECK "EnableOnlineCheck"
#define CONF_AUTO_CONNECT_ROAMING_SERVICES "AutoConnectRoamingServices"
+#define CONF_USE_GATEWAYS_AS_TIMESERVERS "UseGatewayAsTimeservers"
static const char *supported_options[] = {
CONF_BG_SCAN,
@@ -140,6 +143,7 @@ static const char *supported_options[] = {
CONF_VENDOR_CLASS_ID,
CONF_ENABLE_ONLINE_CHECK,
CONF_AUTO_CONNECT_ROAMING_SERVICES,
+ CONF_USE_GATEWAYS_AS_TIMESERVERS,
NULL
};
@@ -431,6 +435,13 @@ static void parse_config(GKeyFile *config)
connman_settings.auto_connect_roaming_services = boolean;
g_clear_error(&error);
+
+ boolean = __connman_config_get_bool(config, "General",
+ CONF_USE_GATEWAYS_AS_TIMESERVERS, &error);
+ if (!error)
+ connman_settings.use_gateways_as_timeservers = boolean;
+
+ g_clear_error(&error);
}
static int config_init(const char *file)
@@ -644,6 +655,9 @@ bool connman_setting_get_bool(const char *key)
if (g_str_equal(key, CONF_AUTO_CONNECT_ROAMING_SERVICES))
return connman_settings.auto_connect_roaming_services;
+ if (g_str_equal(key, CONF_USE_GATEWAYS_AS_TIMESERVERS))
+ return connman_settings.use_gateways_as_timeservers;
+
return false;
}
--
2.7.4

View File

@ -1,50 +0,0 @@
From 3ce40776cf1e9cbb02279117298e2514aba42ffe Mon Sep 17 00:00:00 2001
From: Chris Novakovic <chris@chrisn.me.uk>
Date: Sun, 27 May 2018 17:02:53 +0100
Subject: timeserver: Use gateways as timeservers if
UseGatewaysAsTimeservers=true
Rather than always assuming that service gateways are capable of
functioning as timeservers, only do so if UseGatewaysAsTimeservers is
set to true in main.conf.
---
src/timeserver.c | 23 ++++++++++++++---------
1 file changed, 14 insertions(+), 9 deletions(-)
diff --git a/src/timeserver.c b/src/timeserver.c
index 393c64c..f9467a2 100644
--- a/src/timeserver.c
+++ b/src/timeserver.c
@@ -268,15 +268,20 @@ GSList *__connman_timeserver_get_all(struct connman_service *service)
for (i = 0; service_ts && service_ts[i]; i++)
list = __connman_timeserver_add_list(list, service_ts[i]);
- network = __connman_service_get_network(service);
- if (network) {
- index = connman_network_get_index(network);
- service_gw = __connman_ipconfig_get_gateway_from_index(index,
- CONNMAN_IPCONFIG_TYPE_ALL);
-
- /* Then add Service Gateway to the list */
- if (service_gw)
- list = __connman_timeserver_add_list(list, service_gw);
+ /*
+ * Then add Service Gateway to the list, if UseGatewaysAsTimeservers
+ * configuration option is set to true.
+ */
+ if (connman_setting_get_bool("UseGatewaysAsTimeservers")) {
+ network = __connman_service_get_network(service);
+ if (network) {
+ index = connman_network_get_index(network);
+ service_gw = __connman_ipconfig_get_gateway_from_index(index,
+ CONNMAN_IPCONFIG_TYPE_ALL);
+
+ if (service_gw)
+ list = __connman_timeserver_add_list(list, service_gw);
+ }
}
/* Then add Global Timeservers to the list */
--
cgit v1.1