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: [PATCH] Remove wifi service directories which are not
      provisioned and not autoconnect and non-favorite when connmand
      starts up. Add removed flag to prevent connmand from re-creating
      removed provision service directory. (Patrik Flykt)
   2. Re: [PATCH] dhcpv6: use correct dhcp renew time when valid
      life-time is infinity. (Patrik Flykt)
   3. Re: [PATCH] wifi: No need to allocate and free memory if
      ifname is NULL (Patrik Flykt)
   4. Re: Routing/Port forwarding between connman interfaces
      (Patrik Flykt)
   5. Re: connman-vpnd does not reconnect after resume (Patrik Flykt)
   6. Details about the Patch (Natarajan, Ponniah (P.))


----------------------------------------------------------------------

Message: 1
Date: Tue, 31 May 2016 10:09:18 +0300
From: Patrik Flykt <[email protected]>
To: Feng Wang <[email protected]>, [email protected]
Subject: Re: [PATCH] Remove wifi service directories which are not
        provisioned and not autoconnect and non-favorite when connmand starts
        up. Add removed flag to prevent connmand from re-creating removed
        provision service directory.
Message-ID: <[email protected]>
Content-Type: text/plain; charset="UTF-8"


        Hi,

On Fri, 2016-05-06 at 14:37 -0700, Feng Wang wrote:
> ---

First of all, write a *short* summary line for subject and then write
the actual description in the commit message as I asked you to do after
your last patch.

What is the issue this patch is trying to fix?

Cheers,

        Patrik

> ?src/config.c??|??2 +-
> ?src/connman.h |??2 ++
> ?src/service.c | 33 ++++++++++++++++++++++++++++++---
> ?3 files changed, 33 insertions(+), 4 deletions(-)
> 
> diff --git a/src/config.c b/src/config.c
> index dcbee06..88e35b1 100644
> --- a/src/config.c
> +++ b/src/config.c
> @@ -186,7 +186,7 @@ static void unregister_service(gpointer data)
> ?                     __connman_service_set_immutable(service,
> false);
> ?                     __connman_service_set_config(service, NULL,
> NULL);
> ?                     __connman_service_remove(service);
> -
> +                     __connman_service_set_removed(service,
> true);
> ?                     /*
> ?                     ?* Ethernet or gadget service cannot be
> removed by
> ?                     ?* __connman_service_remove() so reset the
> ipconfig
> diff --git a/src/connman.h b/src/connman.h
> index e849ed8..0eb475b 100644
> --- a/src/connman.h
> +++ b/src/connman.h
> @@ -697,6 +697,8 @@ int __connman_service_set_immutable(struct
> connman_service *service,
> ?                                             bool immutable);
> ?int __connman_service_set_ignore(struct connman_service *service,
> ?                                             bool ignore);
> +int __connman_service_set_removed(struct connman_service *service,
> +                                             bool removed);
> ?void __connman_service_set_search_domains(struct connman_service
> *service,
> ?                                     char **domains);
> ?
> diff --git a/src/service.c b/src/service.c
> index 768426b..8231f4f 100644
> --- a/src/service.c
> +++ b/src/service.c
> @@ -125,6 +125,7 @@ struct connman_service {
> ?     bool hidden_service;
> ?     char *config_file;
> ?     char *config_entry;
> +     bool removed;
> ?};
> ?
> ?static bool allow_property_changed(struct connman_service *service);
> @@ -4608,6 +4609,7 @@ static void service_initialize(struct
> connman_service *service)
> ?     service->hidden = false;
> ?
> ?     service->ignore = false;
> +     service->removed = false;
> ?
> ?     service->connect_reason =
> CONNMAN_SERVICE_CONNECT_REASON_NONE;
> ?
> @@ -5023,6 +5025,17 @@ int __connman_service_set_ignore(struct
> connman_service *service,
> ?     return 0;
> ?}
> ?
> +int __connman_service_set_removed(struct connman_service *service,
> +                                             bool removed)
> +{
> +     if (!service)
> +             return -EINVAL;
> +
> +     service->removed = removed;
> +
> +     return 0;
> +}
> +
> ?void __connman_service_set_string(struct connman_service *service,
> ?                             ??const char *key, const char
> *value)
> ?{
> @@ -6863,6 +6876,11 @@ void
> __connman_service_update_from_network(struct connman_network
> *network)
> ?     if (!service->network)
> ?             return;
> ?
> +     if (service->removed) {
> +             /* don't update/create removed provisioned service
> */
> +             return;
> +     }
> +
> ?     name = connman_network_get_string(service->network, "Name");
> ?     if (g_strcmp0(service->name, name) != 0) {
> ?             g_free(service->name);
> @@ -6995,8 +7013,9 @@ static void remove_unprovisioned_services(void)
> ?{
> ?     gchar **services;
> ?     GKeyFile *keyfile, *configkeyfile;
> -     char *file, *section;
> +     char *file, *section, *autoconnect;
> ?     int i = 0;
> +     bool value;
> ?
> ?     services = connman_storage_get_services();
> ?     if (!services)
> @@ -7012,9 +7031,17 @@ static void
> remove_unprovisioned_services(void)
> ?
> ?             file = g_key_file_get_string(keyfile, services[i],
> ?                                     "Config.file", NULL);
> -             if (!file)
> +             if (!file) {
> +                     /* remove unprovisoned and Not autoconnect
> and non-favorite service directory */
> +                     autoconnect = g_key_file_get_string(keyfile,
> services[i],
> +                                                             "Aut
> oConnect", NULL);
> +                     value = g_key_file_get_boolean(keyfile,
> services[i], "Favorite", NULL);
> +                     if (!autoconnect && !value) {
> +                             __connman_storage_remove_service(ser
> vices[i]);
> +                     }
> +                     g_free(autoconnect);
> ?                     goto next;
> -
> +             }
> ?             section = g_key_file_get_string(keyfile,
> services[i],
> ?                                     "Config.ident", NULL);
> ?             if (!section)


------------------------------

Message: 2
Date: Tue, 31 May 2016 10:12:23 +0300
From: Patrik Flykt <[email protected]>
To: Feng Wang <[email protected]>, [email protected]
Subject: Re: [PATCH] dhcpv6: use correct dhcp renew time when valid
        life-time is infinity.
Message-ID: <[email protected]>
Content-Type: text/plain; charset="UTF-8"

On Wed, 2016-05-25 at 14:37 -0700, Feng Wang wrote:
> Based on RFC 3315, 22.6, the valid life-time is infinite when its
> value is 0xffffffff. In the g_dhcpv6_client_get_timeouts, the expire
> data type is time_t. If time_t is uint32, the last_request time plus
> 0xffffffff will wrapover so that expire time is smaller than current
> time. Thus the dhcpv6 will restart immediately(dhcpv6_restart called).
> ---
> ?gdhcp/client.c |??9 +++++++--
> ?src/dhcpv6.c???| 12 +++++++++---
> ?2 files changed, 16 insertions(+), 5 deletions(-)
> 
> diff --git a/gdhcp/client.c b/gdhcp/client.c
> index 9012b38..2be3982 100644
> --- a/gdhcp/client.c
> +++ b/gdhcp/client.c
> @@ -835,8 +835,13 @@ int g_dhcpv6_client_get_timeouts(GDHCPClient 
> *dhcp_client,
> ?     if (started)
> ?             *started = dhcp_client->last_request;
> ?
> -     if (expire)
> -             *expire = dhcp_client->last_request + dhcp_client->expire;
> +     if (expire) {
> +             if (dhcp_client->expire == 0xffffffff)
> +                     /* RFC3315 22.6 infinite valid-lifetime */
> +                     *expire = 0xffffffff;
> +             else
> +                     *expire = dhcp_client->last_request + 
> dhcp_client->expire;
> +     }
> ?
> ?     return 0;
> ?}
> diff --git a/src/dhcpv6.c b/src/dhcpv6.c
> index 9e21040..abbc1bf 100644
> --- a/src/dhcpv6.c
> +++ b/src/dhcpv6.c
> @@ -1195,7 +1195,7 @@ static int check_restart(struct connman_dhcpv6 *dhcp)
> ?                             NULL, &expired);
> ?     current = time(NULL);
> ?
> -     if (current >= expired) {
> +     if (current >= expired && expired != 0xffffffff) {
> ?             DBG("expired by %d secs", (int)(current - expired));
> ?
> ?             g_timeout_add(0, dhcpv6_restart, dhcp);
> @@ -1442,8 +1442,14 @@ int __connman_dhcpv6_start_renew(struct 
> connman_network *network,
> ?             /* RFC 3315, 22.4
> ?             ?* Client can choose the timeout.
> ?             ?*/
> -             T1 = (expired - started) / 2;
> -             T2 = (expired - started) / 10 * 8;
> +             if (expired == 0xffffffff) {
> +             ????/* RFC 3315, 22.6 infinite valid-lifetime */
> +             ????T1 = 0xffffffff / 2;
> +             ????T2 = 0xffffffff/ 10 * 8;

If the timeout is infinite, no timeout should be set in the first
place. This now sets a non-infinite timeout to a large value which
looks wrong.

> +             } else {
> +             ????T1 = (expired - started) / 2;
> +             ????T2 = (expired - started) / 10 * 8;
> +             }
> ?     }
> ?
> ?     dhcp->callback = callback;


        Patrik



------------------------------

Message: 3
Date: Tue, 31 May 2016 10:19:44 +0300
From: Patrik Flykt <[email protected]>
To: Saurav Babu <[email protected]>, [email protected]
Cc: [email protected]
Subject: Re: [PATCH] wifi: No need to allocate and free memory if
        ifname is NULL
Message-ID: <[email protected]>
Content-Type: text/plain; charset="UTF-8"

On Fri, 2016-05-06 at 16:01 +0530, Saurav Babu wrote:
> g_strdup() will return NULL only when ifname is NULL. This patch
> checks
> ifname before any memory allocation and free is done.
> ---

Applied, thanks!

        Patrik


------------------------------

Message: 4
Date: Tue, 31 May 2016 10:24:04 +0300
From: Patrik Flykt <[email protected]>
To: Tom <[email protected]>, [email protected]
Subject: Re: Routing/Port forwarding between connman interfaces
Message-ID: <[email protected]>
Content-Type: text/plain; charset="UTF-8"

On Fri, 2016-05-20 at 14:52 +0200, Tom wrote:
> Hi all,
> 
> I try to find some hints about the issue without any luck, so here
> my?
> question:
> 
> connman will normally find the best way to connect a client to the?
> internet through concurrent technologies and will disable the other?
> interface addresse.
> 
> Now I would like to set my system up as a router with port
> forwarding.
> 
> What I want to know: Is there an easy way to let two addresse be?
> available (e.g. wifi and ethernet) and is it possible to set up
> iptable?
> rules on these interfaces without interfering with connman internals?

The IP addresses for different service are assigned as long as the
services are connect. The default gateway is set to the most preferred
service only.

Connman adds its rules to the nat POSTROUTING table in a chain using a
"connman-" prefix. Also, when sessions are used, chains prefixed by
"connman-" are added to mangle INPUT and POSTROUTING tables.


Cheers,

        Patrik



------------------------------

Message: 5
Date: Tue, 31 May 2016 10:28:37 +0300
From: Patrik Flykt <[email protected]>
To: Vasiliy Tolstov <[email protected]>, connman
        <[email protected]>
Subject: Re: connman-vpnd does not reconnect after resume
Message-ID: <[email protected]>
Content-Type: text/plain; charset="UTF-8"

On Sat, 2016-05-07 at 23:21 +0300, Vasiliy Tolstov wrote:
> I'm build latest connman 1.32 and connman vpn plugin.
> After lid closed my laptop suspended to ram. After resume connman
> succeseful reconnect to my wifi, but vpn connection not reconnected.

I suppose the VPN service marked autoconnectable in ConnMan?

For this a log with -d src/service.c is needed to find out whether
ConnMan is trying to autoconnect VPNs.

Cheers,

        Patrik

> Relevant logs from connman-vpn service:
> May 07 23:15:59 acer.yoctocloud.net connman-vpnd[8360]: wlan0
> {update}
> flags 36931 <UP,RUNNING>
> May 07 23:15:59 acer.yoctocloud.net connman-vpnd[8360]: wlan0
> {update}
> flags 36867 <UP>
> May 07 23:15:59 acer.yoctocloud.net connman-vpnd[8360]: wlan0
> {newlink} index 3 address B8:86:87:C7:CA:5D mtu 1500
> May 07 23:15:59 acer.yoctocloud.net connman-vpnd[8360]: wlan0
> {newlink} index 3 operstate 2 <DOWN>
> May 07 23:15:59 acer.yoctocloud.net openvpn[8363]:
> [intra.office.clodo.ru] Inactivity timeout (--ping-restart),
> restarting
> May 07 23:15:59 acer.yoctocloud.net openvpn[8363]:
> SIGUSR1[soft,ping-restart] received, process restarting
> May 07 23:15:59 acer.yoctocloud.net connman-vpnd[8360]: pid 8363 was
> not killed, retrying after 2 sec
> May 07 23:15:59 acer.yoctocloud.net connman-vpnd[8360]: vpn0 {update}
> flags 37009 <UP>
> May 07 23:15:59 acer.yoctocloud.net connman-vpnd[8360]: vpn0
> {newlink}
> index 6 operstate 2 <DOWN>
> May 07 23:15:59 acer.yoctocloud.net connman-vpnd[8360]: vpn0 {update}
> flags 37008 <DOWN>
> May 07 23:15:59 acer.yoctocloud.net connman-vpnd[8360]: vpn0
> {newlink}
> index 6 operstate 2 <DOWN>
> May 07 23:15:59 acer.yoctocloud.net connman-vpnd[8360]: vpn0
> {dellink}
> index 6 operstate 2 <DOWN>
> May 07 23:15:59 acer.yoctocloud.net connman-vpnd[8360]: vpn0 {remove}
> index 6
> May 07 23:16:00 acer.yoctocloud.net connman-vpnd[8360]: wlan0
> {update}
> flags 102403 <UP,LOWER_UP>
> May 07 23:16:00 acer.yoctocloud.net connman-vpnd[8360]: wlan0
> {newlink} index 3 address B8:86:87:C7:CA:5D mtu 1500
> May 07 23:16:00 acer.yoctocloud.net connman-vpnd[8360]: wlan0
> {newlink} index 3 operstate 5 <DORMANT>
> May 07 23:16:00 acer.yoctocloud.net connman-vpnd[8360]: wlan0
> {update}
> flags 102467 <UP,RUNNING,LOWER_UP>
> May 07 23:16:00 acer.yoctocloud.net connman-vpnd[8360]: wlan0
> {newlink} index 3 address B8:86:87:C7:CA:5D mtu 1500
> May 07 23:16:00 acer.yoctocloud.net connman-vpnd[8360]: wlan0
> {newlink} index 3 operstate 6 <UP>
> May 07 23:19:14 acer.yoctocloud.net connman-vpnd[8360]: vpn0 {create}
> index 7 type 65534 <NONE>
> May 07 23:19:14 acer.yoctocloud.net connman-vpnd[8360]: vpn0 {update}
> flags 4240 <DOWN>
> May 07 23:19:14 acer.yoctocloud.net connman-vpnd[8360]: vpn0
> {newlink}
> index 7 operstate 2 <DOWN>
> 


------------------------------

Message: 6
Date: Tue, 31 May 2016 12:27:08 +0000
From: "Natarajan, Ponniah (P.)" <[email protected]>
To: "'[email protected]'" <[email protected]>
Subject: Details about the Patch
Message-ID:
        
<vi1pr0601mb20774c084474672907372132da...@vi1pr0601mb2077.eurprd06.prod.outlook.com>
        
Content-Type: text/plain; charset="us-ascii"

Hi,

Please let me know whether this patch as part of below link has been considered 
for release? Or any other mechanism is handled in current connman release v1.32

http://permalink.gmane.org/gmane.comp.handhelds.moblin.connman/18794

We are observing similar issue with connman v1.31, where sometimes upon power 
on of the device, settings of connman for wifi shows as "True", but when run 
the connmanctl to get the technology state shows the Powered state as "False"



Regards,
Ponniah Natarajan.
------------------------------------
Visteon Electronics, India.
Ph Off  : +91-44-49477650
Mob     : +91-98401-08041
------------------------------------

-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://lists.01.org/pipermail/connman/attachments/20160531/83f2a58c/attachment.html>

------------------------------

Subject: Digest Footer

_______________________________________________
connman mailing list
[email protected]
https://lists.01.org/mailman/listinfo/connman


------------------------------

End of connman Digest, Vol 7, Issue 18
**************************************

Reply via email to