Send connman mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.01.org/mailman/listinfo/connman
or, 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: X-ConnMan-Status of online check server (Daniel Wagner)
2. Re: [PATCH 0/3] Add options to configure Online check
(Daniel Wagner)
3. Re: Predefined hostname in dhcp requests (Daniel Wagner)
4. Re: race between __connman_service_connect and
config_notify_handler (Daniel Wagner)
5. Re: BUG: file descriptor leak in DHCPv6 (Daniel Wagner)
6. [PATCH] service: Do no leak stats FDs (Daniel Wagner)
7. Re: string expected, got nil (Daniel Wagner)
----------------------------------------------------------------------
Message: 1
Date: Sun, 12 Nov 2017 09:57:46 +0100
From: Daniel Wagner <[email protected]>
To: Masashi Honma <[email protected]>, [email protected]
Subject: Re: X-ConnMan-Status of online check server
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8
Hi Masashi,
[Sorry for the long delay. I hope to answer mails a in timely matter again.
Just slightly overloaded with work]
On 10/29/2017 08:51 AM, Masashi Honma wrote:
> Currently ConnMan checks X-ConnMan-Status in HTTP header of online check
> server.
> This looks ConnMan only specification.
> Indeed, iOS and Android checks only "Success" or "Fail" string in HTTP body.
> Is there any reason to use the HTTP header ?
>From reading the code, it looks like the X-ConnMan-Status is not strictly
necessary. Though one could argue, that having the X-ConnMan-Status in there,
tells the client, that the connected server speaks a certain protocol.
There are a bunch of additional X-ConnMan-* fields parsed lke
X-ConnMan-Client-IP, X-ConnMan-Client-Country, X-ConnMan-Client-Region and
X-ConnMan-Client-Timezone (see portal_manage_status()).
Thanks,
Daniel
------------------------------
Message: 2
Date: Sun, 12 Nov 2017 10:20:36 +0100
From: Daniel Wagner <[email protected]>
To: Christophe Ronco <[email protected]>
Cc: [email protected], 'Marcel Holtmann' <[email protected]>
Subject: Re: [PATCH 0/3] Add options to configure Online check
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8; format=flowed
Hi Christophe,
First, thanks for taking the time and providing the patches.
On 10/30/2017 05:36 PM, Christophe Ronco wrote:
> I have added some options to configure URLs used to do the online check.
> I have added to options to set the URLs for IPv4 and IPv6 and another option
> to disable the check of X-ConnMan-Status HTTP header.
This is a topic which pops up in regular basis. Marcel has a strong
opinion on why the URL should not be easily changed via a config file.
See the discussion here [1]. I don't think his opinion has changed since
then.
See https://www.mail-archive.com/[email protected]/msg18104.html
> The goal is to have this feature for boards that do not have access to
> Internet.
Recently, we added the config switches to disable it the online test
completely. see EnableOnlineCheck. When set to false, ConnMan wont try
to do the online test. The service will stay in the READY state. That
means the interface has been setup up and is ready to be used.
Thanks,
Daniel
------------------------------
Message: 3
Date: Sun, 12 Nov 2017 10:51:52 +0100
From: Daniel Wagner <[email protected]>
To: Marco Gigante <[email protected]>
Cc: [email protected]
Subject: Re: Predefined hostname in dhcp requests
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8; format=flowed
Hi Marco,
On 11/06/2017 03:46 PM, Marco Gigante wrote:
> Hi all,
> I'm new to connman. I'm writing here to ask for informations about
> proposing modifications to connman.
Welcome!
> I made changes to connman for a project I'm working on, which required
> to send a fixed hostname in connman dhcp requests during network
> interface configuration (regardless of the actual system hostname).
> My system hostname may change since its startup, so I added a
> configuration option to put into main.conf to have a fixed hostname into
> dhcp requests.
It's a while since since I touched that code. So my knowledge is a bit
rusty. I suspect you know the details better than me. So bear with me :)
So I checked what we currently do. If I am not completely mistaken we
extract the hostname and domain name at ConnMan startup time in the
loopback plugin. There is no tracking if the hostname changes over time.
And then we have some code for "org.freedesktop.hostname1"
(src/machine.c) in place. Which just extracts the machine type. This
code is able to track hostname changes provided
org.freedesktop.hostname1 is doing its job.
I rather like to avoid adding the hostname setting into connman config
file. It would be better to extract this from the main source.
So I suggest to extend the src/machine.c code instead. Provided this
works. Probably loopback.c should only used as fallback if
org.freedesktop.hostname1 is not working.
> Can such a modification be of any interest? I would be more than happy
> to send a patch so you can evaluate it.
Yes, of course. Having some patches (even though they might just be a
prove of concept) are usually much better to understand and to discuss.
> I also want to ask whether I can eventually send the git formatted-patch
> directly to this ML or I have to follow some other procedure.
Yes, 'git send-email' is the preferred contribution way on this mailing
list. Same procedures and etiquette as on LKML :)
Thanks,
Daniel
------------------------------
Message: 4
Date: Sun, 12 Nov 2017 11:05:40 +0100
From: Daniel Wagner <[email protected]>
To: Vasyl Vavrychuk <[email protected]>, [email protected]
Subject: Re: race between __connman_service_connect and
config_notify_handler
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8; format=flowed
Hi Vasyl,
On 11/06/2017 11:40 PM, Vasyl Vavrychuk wrote:
> I have implemented GUI for connman which in particular connects to
> 802.1x services.
>
> Since for them we have to use provision file I have following simple
> algorithm.
>
> 1. Write connection parameters in provision file and flush it.
> 2. Call connman service Connect method via D-Bus.
>
> But it looks like sometimes I have Connect handled sooner than provision
> file reloaded.
>
> I am not 100% sure, but looking at the source code I think that this
> situation is at least theoretically possible. Isn't it?
I think this race is real. ConnMan uses inotify to monitor changes in
the /var/lib/connman directory. Whenever a file is updated it will take
some time until ConnMan sees the changes. ConnMan itself is single
threaded and therefore all changes have been processed or they haven't.
Anyway not really sure how to fix this. They only way I see is to add a
D-Bus call which writes the provisioning to the disc. Though this idea
has not been popular around here. I personally don't mind having such an
extension.
Thanks,
Daniel
------------------------------
Message: 5
Date: Sun, 12 Nov 2017 20:02:20 +0100
From: Daniel Wagner <[email protected]>
To: Richard Genoud <[email protected]>, [email protected]
Subject: Re: BUG: file descriptor leak in DHCPv6
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8; format=flowed
Hi Richard,
On 11/08/2017 04:41 PM, Richard Genoud wrote:
> Hi all,
>
> I found a bug in connman, leading to a "too many open files" error.
Thanks for the detail report. I was able to to reproduce one FD leak. I
am not sure if that is the only one. I couldn't really figure out when
the FDs are release in the dhcp code path. The g_io_channel_*() is not
really helpful tracing such things.
Anyway, I'll send a patch which fixes at a leak in the stats file. Can
you check if you still see the leak?
Thanks,
Daniel
------------------------------
Message: 6
Date: Sun, 12 Nov 2017 20:04:26 +0100
From: Daniel Wagner <[email protected]>
To: [email protected]
Cc: Richard Genoud <[email protected]>, Daniel Wagner
<[email protected]>
Subject: [PATCH] service: Do no leak stats FDs
Message-ID: <[email protected]>
ConnMan leaks the stats file descriptor. The disconnect path is
slightly more complex then it one would suspect. So when the service
goes from ONLINE to IDLE because the Ethernet cable was unplugged, the
service will retry to connect. This ends up opening up another FD for
the stats file. Eventually the service will be removed but we bail out
a early in the __connman_service_disconnect() function and never call
__connann_stats_servicde_unregister. Let's move the unregister up so
that we always call it.
---
src/service.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/service.c b/src/service.c
index 197f2660c50c..66e5b1823e05 100644
--- a/src/service.c
+++ b/src/service.c
@@ -6429,6 +6429,8 @@ int __connman_service_disconnect(struct connman_service
*service)
reply_pending(service, ECONNABORTED);
+ __connman_stats_service_unregister(service);
+
if (service->network) {
err = __connman_network_disconnect(service->network);
} else if (service->type == CONNMAN_SERVICE_TYPE_VPN &&
@@ -6458,8 +6460,6 @@ int __connman_service_disconnect(struct connman_service
*service)
__connman_ipconfig_disable(service->ipconfig_ipv4);
__connman_ipconfig_disable(service->ipconfig_ipv6);
- __connman_stats_service_unregister(service);
-
return err;
}
--
2.9.5
------------------------------
Message: 7
Date: Sun, 12 Nov 2017 20:08:43 +0100
From: Daniel Wagner <[email protected]>
To: Mike Schmitz <[email protected]>
Cc: [email protected]
Subject: Re: string expected, got nil
Message-ID: <[email protected]>
Content-Type: text/plain; charset=windows-1252; format=flowed
Hi Mike,
On 11/08/2017 10:44 PM, Mike Schmitz wrote:
> Devuan Ascii
> Lua 5.1.5-8.1+b2
> Awesome 4.0-1
>
> I installed connman via luarocks.
I think this is the ConnMan widget for awesome, right? In this case you
should contact the project:
https://github.com/stefano-m/awesome-connman_widget
(I hope that is the right one)
> I get this error when trying to load connman:
>
> /usr/local/share/lua/5.1/dbus_proxy/init.lua:278: bad argument #3 to 'format'
> (string expected, got nil
What is worth, I am running this widget on currently and it works fine
with a current ConnMan. So in practice a current ConnMan works just fine
with connman_widget 0.1.5-1.
Thanks,
Daniel
------------------------------
Subject: Digest Footer
_______________________________________________
connman mailing list
[email protected]
https://lists.01.org/mailman/listinfo/connman
------------------------------
End of connman Digest, Vol 25, Issue 6
**************************************