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. [PATCH] service: Disconnect old service only when connecting
      new service (Saurav Babu)
   2. Re: [PATCH 2/2] stats: cleanup of stats file error handling
      (Lukasz Nowak)
   3. Re: [PATCH] service: Disconnect old service only when
      connecting new service (Daniel Wagner)
   4. openvpn plugin does not set a valid netmask and so a valid
      routing table (Michele Dionisio)


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

Message: 1
Date: Thu, 27 Oct 2016 12:39:30 +0530
From: Saurav Babu <[email protected]>
To: [email protected]
Cc: [email protected], Saurav Babu <[email protected]>
Subject: [PATCH] service: Disconnect old service only when connecting
        new service
Message-ID: <[email protected]>

In the following scenario:
 1. Device is connected to AP in non hidden mode.
 2. Connection is initated to AP in hidden mode.
connman disconnects old service and tries to connect to new service. But
for connecting hidden service it first scans the hidden AP and when
network is added for hidden AP then connection is tried. In the meantime
normal AP got disconnected and was tried to autoconnect even before
hidden AP was scanned successfully.
Ideally non hidden AP should only be disconnected when hidden AP is
found in the scan list and its connection is intiated.
---
 src/service.c | 44 ++++++++++++++++++++++----------------------
 1 file changed, 22 insertions(+), 22 deletions(-)

diff --git a/src/service.c b/src/service.c
index f6a76f6..7d3847e 100644
--- a/src/service.c
+++ b/src/service.c
@@ -4015,33 +4015,13 @@ static DBusMessage *connect_service(DBusConnection 
*conn,
                                        DBusMessage *msg, void *user_data)
 {
        struct connman_service *service = user_data;
-       int index, err = 0;
-       GList *list;
+       int err = 0;
 
        DBG("service %p", service);
 
        if (service->pending)
                return __connman_error_in_progress(msg);
 
-       index = __connman_service_get_index(service);
-
-       for (list = service_list; list; list = list->next) {
-               struct connman_service *temp = list->data;
-
-               if (!is_connecting(temp) && !is_connected(temp))
-                       break;
-
-               if (service == temp)
-                       continue;
-
-               if (service->type != temp->type)
-                       continue;
-
-               if (__connman_service_get_index(temp) == index &&
-                               __connman_service_disconnect(temp) == 
-EINPROGRESS)
-                       err = -EINPROGRESS;
-
-       }
        if (err == -EINPROGRESS)
                return __connman_error_operation_timeout(msg);
 
@@ -5923,11 +5903,31 @@ static void prepare_8021x(struct connman_service 
*service)
 
 static int service_connect(struct connman_service *service)
 {
-       int err;
+       int err, index;
+       GList *list;
 
        if (service->hidden)
                return -EPERM;
 
+       index = __connman_service_get_index(service);
+
+       for (list = service_list; list; list = list->next) {
+               struct connman_service *temp = list->data;
+
+               if (!is_connecting(temp) && !is_connected(temp))
+                       break;
+
+               if (service == temp)
+                       continue;
+
+               if (service->type != temp->type)
+                       continue;
+
+               if (__connman_service_get_index(temp) == index &&
+                               __connman_service_disconnect(temp) == 
-EINPROGRESS)
+                       return -ETIMEDOUT;
+       }
+
        switch (service->type) {
        case CONNMAN_SERVICE_TYPE_UNKNOWN:
        case CONNMAN_SERVICE_TYPE_SYSTEM:
-- 
1.9.1



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

Message: 2
Date: Thu, 27 Oct 2016 12:36:30 +0100
From: Lukasz Nowak <[email protected]>
To: Daniel Wagner <[email protected]>, [email protected]
Subject: Re: [PATCH 2/2] stats: cleanup of stats file error handling
Message-ID: <[email protected]>
Content-Type: text/plain; charset=windows-1252

All ok. Thanks.
Lukasz

On 26/10/16 19:09, Daniel Wagner wrote:
> On 10/26/2016 07:13 PM, Lukasz Nowak wrote:
>> From: Lukasz Nowak <[email protected]>
>>
>> Moved mkdir before a stats file is created, to avoid
>> unnecessary further steps in case it fails.
>> Removed unnecessary conditions in clean-up.
> 
> I splitted into two patches and applied. Please check if I screwed it up.
> 
> Thanks,
> Daniel


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

Message: 3
Date: Thu, 27 Oct 2016 15:46:37 +0200
From: Daniel Wagner <[email protected]>
To: Saurav Babu <[email protected]>, [email protected]
Cc: [email protected]
Subject: Re: [PATCH] service: Disconnect old service only when
        connecting new service
Message-ID: <[email protected]>
Content-Type: text/plain; charset=windows-1252; format=flowed

Hi Saurav,

On 10/27/2016 09:09 AM, Saurav Babu wrote:
> In the following scenario:
>  1. Device is connected to AP in non hidden mode.
>  2. Connection is initated to AP in hidden mode.
> connman disconnects old service and tries to connect to new service. But
> for connecting hidden service it first scans the hidden AP and when
> network is added for hidden AP then connection is tried. In the meantime
> normal AP got disconnected and was tried to autoconnect even before
> hidden AP was scanned successfully.
> Ideally non hidden AP should only be disconnected when hidden AP is
> found in the scan list and its connection is intiated.

So the problem is that autoconnect is faster than scan,connect operation?

I am very reluctant to move the for() loop down from connect_service() 
to service_connect() because it is not clear to me what the impact of it 
is. If I read it correctly D-Bus initiates connection attempts wouldn't 
change because the filter is just deeper down in the call change. Is it 
really only the calls from autoconnect which will be blocked?

Maybe you should try to teach autoconnect not to call 
__connman_service_connect() when we try to connect to a hidden AP? In my 
eyes it makes more sense to teach autoconnect not to do stupid stuff 
instead of blocking it somewhere else.

cheers,
daniel


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

Message: 4
Date: Thu, 27 Oct 2016 20:54:39 +0200
From: Michele Dionisio <[email protected]>
To: [email protected]
Subject: openvpn plugin does not set a valid netmask and so a valid
        routing table
Message-ID:
        <cafwetmpcr-a60q_tomxzi_j53ar1yyq4mbh7do03k2oi8zc...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Hi,
The openvpn plugin does not honor the netmask received from the server
and so connman does not set a valid routing table. The patch attached
solve the issue.

regards
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0000_openvpn_netmask.patch
Type: text/x-patch
Size: 1549 bytes
Desc: not available
URL: 
<http://lists.01.org/pipermail/connman/attachments/20161027/226904c7/attachment-0001.patch>

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

Subject: Digest Footer

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


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

End of connman Digest, Vol 12, Issue 31
***************************************

Reply via email to