Hi Patrik,

> -----Original Message-----
> From: connman [mailto:[email protected]] On Behalf Of
> Patrik Flykt
> Sent: 08 October 2014 12:37
> To: [email protected]
> Subject: Re: Functionality to ignore invalid-key failures
> 
> On Wed, 2014-10-08 at 09:40 +0000, Thiemo van Engelen wrote:
> >
> > Please comment on the functionality and the patch and what I should do
> > to get this integrated into connman. Should I post it on the mailing
> > list or also send it directly to Patrik (or someone else)?
> 
> Thanks for pinging. I forgot to ask which version of ConnMan you were using,
> but that does not really matter.
> 

Just so you know, I was using connman v1.25 (which already contains the commit 
mentioned below)

> Noticed with Jukka that the last error is saved to file. That by itself is 
> not a
> problem, except that when the service is created and the defaults loaded
> from file, on the first connect...
> 
> > diff --git a/src/service.c b/src/service.c index 895387d..70381c4
> > 100644
> > --- a/src/service.c
> > +++ b/src/service.c
> > @@ -5842,8 +5842,8 @@ static int service_connect(struct
> connman_service *service)
> >                                 if (!service->wps ||
> >                                         
> > !connman_network_get_bool(service->network,
> "WiFi.UseWPS"))
> >                                         return -ENOKEY;
> > -                       } else if (service->error ==
> > -                                       CONNMAN_SERVICE_ERROR_INVALID_KEY)
> > +                       } else if (service->error ==
> CONNMAN_SERVICE_ERROR_INVALID_KEY &&
> > +
> > + !connman_setting_get_bool("IgnoreInvalidKey"))
> 
> ...the code interprets the error read from file to be a current one.
> Which is a bug. But meanwhile this has been fixed with a few commits
> leading to 6b70c54a69dfe670eba8c5d3d43ecf24be0e1e51, which actually
> fixed a bit of a different problem. So as of that commit, a saved error does
> not cause the first connect to fail. And after that commit,
> service->error will never be set so the check is now unnecessary and
> should be removed.
> 

I am confident that removing this check will make our problem go away. 
But is it indeed always desired behaviour that stored invalid-key errors are 
ignored and that connman will automatically try to reconnect when the service 
is created?
With the default behaviour of connman/wpa_supplicant, this will result in 
connman trying to reconnect with a possibly wrong key every 5 to 6 minutes.

> If I read the tea leaves correct, all should work fine in current upstream.
> Hope this helps. Can we have a Bush Baby for testing?

I don't really understand.... current upstream still contains the check in 
service_connect, which prevents it from automatically reconnecting when the 
service is created. 
I have tested this today using the latest commits.

I am more than willing to remove the check, test my use case and submit, but I 
am not sure what the impact is on other use cases and thus what other 
situations should be tested.

Cheers,

Thiemo

> 
> Cheers,
> 
>       Patrik
> 
> 
> _______________________________________________
> connman mailing list
> [email protected]
> https://lists.connman.net/mailman/listinfo/connman
_______________________________________________
connman mailing list
[email protected]
https://lists.connman.net/mailman/listinfo/connman

Reply via email to