Send connman mailing list submissions to
[email protected]
To subscribe or unsubscribe via email, send a message with subject or
body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of connman digest..."
Today's Topics:
1. Re: [PATCH] Make DHCP client timeouts suspend aware
(Daniel Wagner)
2. Re: [PATCH 1/2] added default configuration capability by identifier or
interface name.
(Daniel Wagner)
3. Re: [PATCH 2/2] added ability to set the MTU from settings file.
(Daniel Wagner)
4. Re: [PATCH] main: Add CONFIG_FAVORITE_TECHS to supported_options
(Daniel Wagner)
5. Re: Online Status Page on HTTPS (Daniel Wagner)
6. Get paper help and make your work easier (Kaylee Brown)
7. Re: Connman 1.37 no ntp without DNS server (Daniel Wagner)
8. Re: [PATCH 0/6] Support SplitRouting variable on vpnd
(Daniel Wagner)
----------------------------------------------------------------------
Date: Thu, 17 Sep 2020 20:24:55 +0200
From: Daniel Wagner <[email protected]>
Subject: Re: [PATCH] Make DHCP client timeouts suspend aware
To: "Holesch, Simon (GED-SDD1)" <[email protected]>
Cc: "[email protected]" <[email protected]>
Message-ID: <[email protected]>
Content-Type: text/plain; charset=us-ascii
Hi Simon,
On Tue, Sep 01, 2020 at 11:58:13AM +0000, Holesch, Simon (GED-SDD1) wrote:
> The glib timeout uses CLOCK_MONOTONIC, which is paused during suspend on
> Linux and is therefore unfit for network timeouts. This patch introduces
> timeouts based on CLOCK_BOOTTIME_ALARM, which wakes the system on
> timeout.
Patch applied after updating the coding styling. While I was at it I
also renamed a few things and fixed a bug in the initializing the
variables on the stack. Since it was all straight forward I just applied
it. Still please check if I screwed it up.
Thanks,
Daniel
------------------------------
Date: Thu, 17 Sep 2020 20:46:04 +0200
From: Daniel Wagner <[email protected]>
Subject: Re: [PATCH 1/2] added default configuration capability by
identifier or interface name.
To: Damien LEFEVRE <[email protected]>
Cc: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=us-ascii
Hi Damien,
Please use a prefix for the subject.
On Fri, Sep 11, 2020 at 11:04:34AM +0300, Damien LEFEVRE wrote:
> The default configurations go into STORAGEDIR/defaults directory and are
> named after the service file.
>
> Ex for eth0 (00:04:4B:E5:93:6D) interface:
> - STORAGEDIR/defaults/ethernet_eth0_cable with
> [ethernet_eth0_cable]
> Name=Wired
> AutoConnect=true
> IPv4.method=manual
> IPv6.method=auto
> IPv6.privacy=disabled
> IPv4.netmask_prefixlen=24
> IPv4.local_address=192.168.1.100
> MTU=9000
>
> will be copied into STORAGEDIR/ethernet_00044be5936d_cable/settings and
> [ethernet_eth0_cable] will be replaced by [ethernet_00044be5936d_cable] as:
> [ethernet_00044be5936d_cable]
> Name=Wired
> AutoConnect=true
> IPv4.method=manual
> IPv6.method=auto
> IPv6.privacy=disabled
> IPv4.netmask_prefixlen=24
> IPv4.local_address=192.168.1.100
> MTU=9000
>
> - STORAGEDIR/defaults/ethernet_00044be5936d_cable with
> Name=Wired
> AutoConnect=true
> IPv4.method=manual
> IPv6.method=auto
> IPv6.privacy=disabled
> IPv4.netmask_prefixlen=24
> IPv4.local_address=192.168.1.100
> MTU=9000
>
> will be copied to STORAGEDIR/ethernet_00044be5936d_cable/settings and
> the content will not be modified
Can you explain why this is needed? Which problems does it address/fix?
> ---
> include/storage.h | 2 +-
> plugins/wifi.c | 4 +-
> src/dhcpv6.c | 2 +-
> src/service.c | 10 ++--
> src/storage.c | 124 ++++++++++++++++++++++++++++++++++++++++++++--
> 5 files changed, 130 insertions(+), 12 deletions(-)
>
> diff --git a/include/storage.h b/include/storage.h
> index 4c23a14e..902b9c82 100644
> --- a/include/storage.h
> +++ b/include/storage.h
> @@ -29,7 +29,7 @@ extern "C" {
> #endif
>
> gchar **connman_storage_get_services();
> -GKeyFile *connman_storage_load_service(const char *service_id);
> +GKeyFile *connman_storage_load_service(const char *service_id, const char
> *ifname);
>
> #ifdef __cplusplus
> }
> diff --git a/plugins/wifi.c b/plugins/wifi.c
> index f8c22be3..6fda90c5 100644
> --- a/plugins/wifi.c
> +++ b/plugins/wifi.c
> @@ -1054,7 +1054,7 @@ static int get_hidden_connections(GSupplicantScanParams
> *scan_data)
> if (strncmp(services[i], "wifi_", 5) != 0)
> continue;
>
> - keyfile = connman_storage_load_service(services[i]);
> + keyfile = connman_storage_load_service(services[i], "");
> if (!keyfile)
> continue;
>
> @@ -1662,7 +1662,7 @@ static int get_latest_connections(int max_ssids,
> if (strncmp(services[i], "wifi_", 5) != 0)
> continue;
>
> - keyfile = connman_storage_load_service(services[i]);
> + keyfile = connman_storage_load_service(services[i], "");
> if (!keyfile)
> continue;
>
> diff --git a/src/dhcpv6.c b/src/dhcpv6.c
> index 2d5f8f6a..4ad43860 100644
> --- a/src/dhcpv6.c
> +++ b/src/dhcpv6.c
> @@ -198,7 +198,7 @@ static int set_duid(struct connman_service *service,
>
> ident = connman_service_get_identifier(service);
>
> - keyfile = connman_storage_load_service(ident);
> + keyfile = connman_storage_load_service(ident,
> connman_service_get_interface(service));
> if (!keyfile)
> return -EINVAL;
>
> diff --git a/src/service.c b/src/service.c
> index 3202f26c..f9ac1655 100644
> --- a/src/service.c
> +++ b/src/service.c
> @@ -382,7 +382,7 @@ int __connman_service_load_modifiable(struct
> connman_service *service)
>
> DBG("service %p", service);
>
> - keyfile = connman_storage_load_service(service->identifier);
> + keyfile = connman_storage_load_service(service->identifier,
> connman_service_get_interface(service));
> if (!keyfile)
> return -EIO;
>
> @@ -435,7 +435,7 @@ static int service_load(struct connman_service *service)
>
> DBG("service %p", service);
>
> - keyfile = connman_storage_load_service(service->identifier);
> + keyfile = connman_storage_load_service(service->identifier,
> connman_service_get_interface(service));
> if (!keyfile) {
> service->new_service = true;
> return -EIO;
> @@ -6858,7 +6858,7 @@ void __connman_service_read_ip4config(struct
> connman_service *service)
> if (!service->ipconfig_ipv4)
> return;
>
> - keyfile = connman_storage_load_service(service->identifier);
> + keyfile = connman_storage_load_service(service->identifier,
> connman_service_get_interface(service));
> if (!keyfile)
> return;
>
> @@ -6888,7 +6888,7 @@ void __connman_service_read_ip6config(struct
> connman_service *service)
> if (!service->ipconfig_ipv6)
> return;
>
> - keyfile = connman_storage_load_service(service->identifier);
> + keyfile = connman_storage_load_service(service->identifier,
> connman_service_get_interface(service));
> if (!keyfile)
> return;
>
> @@ -7375,7 +7375,7 @@ static void remove_unprovisioned_services(void)
> file = section = NULL;
> keyfile = configkeyfile = NULL;
>
> - keyfile = connman_storage_load_service(services[i]);
> + keyfile = connman_storage_load_service(services[i], "");
> if (!keyfile)
> continue;
>
> diff --git a/src/storage.c b/src/storage.c
> index 5e877ef1..f9ad5b1e 100644
> --- a/src/storage.c
> +++ b/src/storage.c
> @@ -240,16 +240,134 @@ gchar **connman_storage_get_services(void)
> return services;
> }
>
> -GKeyFile *connman_storage_load_service(const char *service_id)
> +GKeyFile *connman_storage_load_service(const char *service_id, const char
> *ifname /*= ""*/)
No comment in the argument list
> {
> - gchar *pathname;
> + gchar *pathname = NULL;
> GKeyFile *keyfile = NULL;
>
> pathname = g_strdup_printf("%s/%s/%s", STORAGEDIR, service_id,
> SETTINGS);
> if (!pathname)
> return NULL;
>
> - keyfile = storage_load(pathname);
> + keyfile = storage_load(pathname);
> +
> + if (!keyfile) {
> + // Try to load default settings with identifier
No C++ comments please (also below).
> + gchar *default_pathname = g_strdup_printf("%s/defaults/%s",
> STORAGEDIR, service_id);
I probably would move the variable declaration at the beginning of the
function but it's more a taste thing here. Though the line is too long,
80 chars limit.
> + if (!default_pathname) {
> + g_free(pathname);
> + return NULL;
> + }
> +
> + // Check if default file exists
> + if (g_file_test(default_pathname, G_FILE_TEST_EXISTS))
> + {
Bracket on the same line as the condition. BTW, should this not be
if (!g_file_test()) {
return NULL?
> + gsize length = 0;
> + gchar *content = NULL;
Hmm, move the declaration at the beginning of the function.
> +
> + // Create settings directory
> + gchar *dirname = g_strdup_printf("%s/%s", STORAGEDIR,
> service_id);
> + if (!dirname) {
> + g_free(default_pathname);
> + g_free(pathname);
> + return NULL;
> + }
> +
> + if (g_mkdir_with_parents(dirname, 0777) < 0) {
> + g_free(dirname);
> + g_free(default_pathname);
> + g_free(pathname);
> + return NULL;
> + }
> +
> + // Copy default file to settings folder
>
> + if (g_file_get_contents (default_pathname, &content,
> &length, NULL)) {
There are unneeded whitespaces at the end of the lines.
> + if (g_file_set_contents (pathname, content,
> length, NULL)) {
> + DBG("Deploying default configuration
> for %s from %s", service_id, default_pathname);
> + DBG("Default content:\n %s", content);
> + keyfile = storage_load(pathname);
> + }
> +
> + g_free(content);
> + }
> +
> + g_free(dirname);
> + }
> +
> + g_free(default_pathname);
> + }
> +
Whitespace damage
> + if (!keyfile && g_strcmp0(ifname, "") != 0)
> + {
Braket should be on the same line as the condition
> + gchar *default_pathname;
> +
> + // If we know the interface name and previous failed,
> + // try to find the default config by name
Whitespace damage at the end of the line. There is more of these
style issues. Please fix also those.
Anyway, you just update the load but where is the store? And is this
stuff backward compatible? That is does it work on system which upgrade
ConnMan? This needs to be backwards compatible.
Thanks,
Daniel
------------------------------
Date: Thu, 17 Sep 2020 20:52:26 +0200
From: Daniel Wagner <[email protected]>
Subject: Re: [PATCH 2/2] added ability to set the MTU from settings
file.
To: Damien LEFEVRE <[email protected]>
Cc: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=us-ascii
Hi Damien,
Please provide a commit message.
On Fri, Sep 11, 2020 at 11:04:35AM +0300, Damien LEFEVRE wrote:
> ---
> src/service.c | 14 ++++++++++++++
> 1 file changed, 14 insertions(+)
>
> diff --git a/src/service.c b/src/service.c
> index f9ac1655..06f19ca5 100644
> --- a/src/service.c
> +++ b/src/service.c
> @@ -605,6 +605,20 @@ static int service_load(struct connman_service *service)
> service->hidden_service = g_key_file_get_boolean(keyfile,
> service->identifier, "Hidden", NULL);
>
> + // Set MTU
> + str = g_key_file_get_string(keyfile,
> + service->identifier, "MTU", NULL);
> + if (str){
space missing
> + int err = 0;
err is already defined at the beginning of service_load;
> + int index = -1;
No need to initialize the variable.
> + char *ifname = connman_service_get_interface(service);
> + index = connman_inet_ifindex(ifname);
Check if index is valid
> + err = connman_inet_set_mtu(index, atoi(str));
Use strtol and check for error.
> + DBG("setting MTU %d, error: %d, service: %s, ifname: %s",
> atoi(str), err, service->identifier, ifname);
This is debugging code, drop it.
> + }
> +
whitespace damage here
> + g_free(str);
> +
> done:
> g_key_file_free(keyfile);
Thanks,
Daniel
------------------------------
Date: Thu, 17 Sep 2020 20:56:14 +0200
From: Daniel Wagner <[email protected]>
Subject: Re: [PATCH] main: Add CONFIG_FAVORITE_TECHS to
supported_options
To: Christoph Steiger <[email protected]>
Cc: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=us-ascii
Hi Christoph,
On Mon, Sep 14, 2020 at 11:13:06AM +0200, Christoph Steiger wrote:
> Fixes `Unknown option DefaultFavoriteTechnologies in main.conf` warning
> we wrongfully get when using connman with the above option.
>
> Signed-off-by: Christoph Steiger <[email protected]>
Patch applied. We don't do the SoB, drop it.
> ---
> src/main.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/src/main.c b/src/main.c
> index 2371771f..92163d54 100644
> --- a/src/main.c
> +++ b/src/main.c
> @@ -158,6 +158,7 @@ static const char *supported_options[] = {
> CONF_AUTO_CONNECT_ROAMING_SERVICES,
> CONF_ACD,
> CONF_USE_GATEWAYS_AS_TIMESERVERS,
> + CONF_FAVORITE_TECHS,
Moved it up to match the order of the defines.
Thanks,
Daniel
------------------------------
Date: Thu, 17 Sep 2020 21:16:09 +0200
From: Daniel Wagner <[email protected]>
Subject: Re: Online Status Page on HTTPS
To: [email protected]
Cc: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=us-ascii
Hi Gabriel,
On Wed, Sep 16, 2020 at 08:02:57AM -0000, [email protected] wrote:
> I'm missing something?
Hmm, maybe the UTF-8 encoding trips over the parser? No idea. Sorry
Thanks,
Daniel
------------------------------
Date: Thu, 17 Sep 2020 19:16:45 -0000
From: "Kaylee Brown" <[email protected]>
Subject: Get paper help and make your work easier
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset="utf-8"
Students have this common assignment where they have to write research papers
and completing these research papers is a huge task. Students have to select a
topic and do extensive research and dig up all unknown facts and gain insights
from them. These insights have to be explained to give a piece of conclusive
evidence and doing all this perfectly will require days or sometimes months of
dedicated work. This is when online paper help can help you by making your work
easier.
<a href="https://www.edumagnate.com/">Paper help</a> is a service provided by
many online websites. These sites employ professionals from different fields
and these professionals will be your paper helper. These experts will do the
required research and do all the necessary activities to build a perfect
research paper. you should just pay the experts some fee for utilizing their
services.
------------------------------
Date: Thu, 17 Sep 2020 21:21:21 +0200
From: Daniel Wagner <[email protected]>
Subject: Re: Connman 1.37 no ntp without DNS server
To: [email protected]
Cc: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=us-ascii
Hi,
On Thu, Sep 17, 2020 at 08:48:40AM -0000, [email protected] wrote:
> I discovered that connman 1.37 does not use a NTP server if there is
> no DNS server specified, even if the NTP server is specified as IPv4
> address. With DNS server entry NTP works fine.
Okay, it supposed to work without DNS entries see sync_next() in
src/timerserver.c. Could you retry and post the output from
connmand -n -d src/timeserver.c
Thanks,
Daniel
------------------------------
Date: Thu, 17 Sep 2020 21:32:06 +0200
From: Daniel Wagner <[email protected]>
Subject: Re: [PATCH 0/6] Support SplitRouting variable on vpnd
To: Jussi Laakkonen <[email protected]>
Cc: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=us-ascii
Hi Jussi,
On Thu, Sep 17, 2020 at 06:37:10PM +0300, Jussi Laakkonen wrote:
> Add support for SplitRouting variable on vpnd. This is amended to VPN
> connection API as boolean parameter and allows to use the API for defining
> whether to use the VPN as default route (SplitRouting=false) or not. The value
> defaults to false.
I am bit confused. Why does the vpnd need to know about the split
routing at all? The vpnd should always push all the routes to ConnMan
and there should be the logic if the routes are used or not. What do I
miss?
BTW, I think this is also a bit fragile because the user might decide to
reorder the services ('enable split routing') while vpn up happens. I
really would like to keep logic code in one daemon as much as possible.
Thanks,
Daniel
------------------------------
Subject: Digest Footer
_______________________________________________
connman mailing list -- [email protected]
To unsubscribe send an email to [email protected]
------------------------------
End of connman Digest, Vol 59, Issue 17
***************************************