Send connman mailing list submissions to
        connman@lists.01.org

To subscribe or unsubscribe via email, send a message with subject or
body 'help' to
        connman-requ...@lists.01.org

You can reach the person managing the list at
        connman-ow...@lists.01.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of connman digest..."

Today's Topics:

   1. OpenVPN key name for the protocol seems incorrect in 
connman-vpn-provider.config.5.in
      (dinoallosaurus1...@gmail.com)
   2. RE: [PATCH] Fix hang up when connecting a secure network with an empty 
passphrase
      (VAUTRIN Emmanuel (Canal Plus Prestataire))
   3. Re: Strange connection problem (Thomas Green)
   4. connmanctl fails to connect to WiFi network having passwords ending with 
a backslash character
      (* *)


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

Date: Mon, 21 Dec 2020 13:55:06 -0000
From: dinoallosaurus1...@gmail.com
Subject: OpenVPN key name for the protocol seems incorrect in
        connman-vpn-provider.config.5.in
To: connman@lists.01.org
Message-ID: <20201221135506.2856.51...@ml01.vlan13.01.org>
Content-Type: text/plain; charset="utf-8"

Hello everyone,
A few days ago I decided to set up my OpenVPN connection with
connman-vpn, I followed the documentation and configured the protocol
used for the connection with:
---
OpenVPN.Protocol=tcp
---
in my configuration file.
However, it didn't work, so I did my research on the corresponding
OpenVPN parameter, that is, --proto.
Then I took a guess and changed the configuration with:
---
OpenVPN.Proto=tcp
---
And it worked like a charm.
I downloaded the source code and confirmed that the key name used for
the protocol is OpenVPN.Proto.
If it's certainly a bug, I would like to modify the code or the doc to
make them identical.

Best Regards,
Yun

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

Date: Mon, 21 Dec 2020 18:25:06 +0000
From: "VAUTRIN Emmanuel (Canal Plus Prestataire)"
        <emmanuel.vaut...@cpexterne.org>
Subject: RE: [PATCH] Fix hang up when connecting a secure network with
        an empty passphrase
To: Daniel Wagner <w...@monom.org>
Cc: "connman@lists.01.org" <connman@lists.01.org>
Message-ID:  <pr1pr02mb4794972610adee6844fcb6f393...@pr1pr02mb4794.eur
        prd02.prod.outlook.com>
Content-Type: multipart/alternative;    boundary="_000_PR1PR02MB479497
        2610ADEE6844FCB6F393C00PR1PR02MB4794eurp_"

--_000_PR1PR02MB4794972610ADEE6844FCB6F393C00PR1PR02MB4794eurp_
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi Daniel,

After several tests, I can not reproduce this issue on v1.38. I presume it =
has been fixed after v1.37.


Best Regards

Emmanuel

________________________________
De : Daniel Wagner <w...@monom.org>
Envoy=E9 : vendredi 4 d=E9cembre 2020 13:53
=C0 : VAUTRIN Emmanuel (Canal Plus Prestataire) <Emmanuel.VAUTRIN@cpexterne=
.org>
Cc : connman@lists.01.org <connman@lists.01.org>
Objet : Re: [PATCH] Fix hang up when connecting a secure network with an em=
pty passphrase

Hi Emmanuel,

On Wed, Dec 02, 2020 at 09:17:17AM -0000, Emmanuel Vautrin wrote:
> Hello everyone,
>
> Please find below the patch fixing this issue:

I need a commit message explaining what you are fixing. The 'why' is
important. Also I can't really understand what do. Maybe it gets more
clear if you describe where the problems are.

> diff --git a/src/service.c b/src/service.c
> index 8d236749..629db995 100644
> --- a/src/service.c
> +++ b/src/service.c
> @@ -4021,6 +4021,7 @@ static void disconnect_on_last_session(enum connman=
_service_type type)
>  static int active_sessions[MAX_CONNMAN_SERVICE_TYPES] =3D {};
>  static int always_connect[MAX_CONNMAN_SERVICE_TYPES] =3D {};
>  static int active_count =3D 0;
> +static bool passphrase_requested =3D false;

No, this can't be a global variable. You need to track it in the service
object I guess.

>
>  void __connman_service_set_active_session(bool enable, GSList *list)
>  {
> @@ -4187,6 +4188,9 @@ static bool auto_connect_service(GList *services,
>                        continue;
>                }
>
> +             if (passphrase_requested)
> +                             return true;

This looks very suspiciously. The auto_connect should not be involved in
anyway how a service is configured.

>                if (service->pending ||
>                                is_connecting(service->state) ||
>                                is_connected(service->state)) {
> @@ -5721,6 +5725,7 @@ static void request_input_cb(struct connman_service=
 *service,
>                err =3D __connman_service_set_passphrase(service, passphra=
se);
>
>   done:
> +     passphrase_requested =3D false;
>        if (err >=3D 0) {
>                /* We forget any previous error. */
>                set_error(service, CONNMAN_SERVICE_ERROR_UNKNOWN);
> @@ -6664,6 +6669,9 @@ int __connman_service_connect(struct connman_servic=
e *service,
>                        if (service->hidden && err !=3D -EINPROGRESS)
>                                service->pending =3D pending;
>
> +                     if (err =3D=3D -EINPROGRESS)
> +                             passphrase_requested =3D true;

If this is needed I think it should go inside the connman agent code. I
rather not have yet another state variable inside service.

Thanks,
Daniel

--_000_PR1PR02MB4794972610ADEE6844FCB6F393C00PR1PR02MB4794eurp_
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<html>
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Diso-8859-=
1">
<style type=3D"text/css" style=3D"display:none;"> P {margin-top:0;margin-bo=
ttom:0;} </style>
</head>
<body dir=3D"ltr">
<div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0);">
Hi Daniel,</div>
<div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0);">
After several tests, I can not reproduce this issue on v1.38. I presume it =
has been fixed after v1.37.</div>
<div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0);">
Best Regards</div>
<div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0);">
Emmanuel<br>
</div>
<div id=3D"appendonsend"></div>
<div style=3D"font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12p=
t; color:rgb(0,0,0)">
<br>
</div>
<hr tabindex=3D"-1" style=3D"display:inline-block; width:98%">
<div id=3D"divRplyFwdMsg" dir=3D"ltr"><font style=3D"font-size:11pt" face=
=3D"Calibri, sans-serif" color=3D"#000000"><b>De :</b> Daniel Wagner &lt;wa=
g...@monom.org&gt;<br>
<b>Envoy=E9 :</b> vendredi 4 d=E9cembre 2020 13:53<br>
<b>=C0 :</b> VAUTRIN Emmanuel (Canal Plus Prestataire) &lt;Emmanuel.VAUTRIN=
@cpexterne.org&gt;<br>
<b>Cc&nbsp;:</b> connman@lists.01.org &lt;connman@lists.01.org&gt;<br>
<b>Objet :</b> Re: [PATCH] Fix hang up when connecting a secure network wit=
h an empty passphrase</font>
<div>&nbsp;</div>
</div>
<div class=3D"BodyFragment"><font size=3D"2"><span style=3D"font-size:11pt"=
>
<div class=3D"PlainText">Hi Emmanuel,<br>
<br>
On Wed, Dec 02, 2020 at 09:17:17AM -0000, Emmanuel Vautrin wrote:<br>
&gt; Hello everyone,<br>
&gt; <br>
&gt; Please find below the patch fixing this issue:<br>
<br>
I need a commit message explaining what you are fixing. The 'why' is<br>
important. Also I can't really understand what do. Maybe it gets more<br>
clear if you describe where the problems are.<br>
<br>
&gt; diff --git a/src/service.c b/src/service.c<br>
&gt; index 8d236749..629db995 100644<br>
&gt; --- a/src/service.c<br>
&gt; +++ b/src/service.c<br>
&gt; @@ -4021,6 +4021,7 @@ static void disconnect_on_last_session(enum conn=
man_service_type type)<br>
&gt;&nbsp; static int active_sessions[MAX_CONNMAN_SERVICE_TYPES] =3D {};<br=
>
&gt;&nbsp; static int always_connect[MAX_CONNMAN_SERVICE_TYPES] =3D {};<br>
&gt;&nbsp; static int active_count =3D 0;<br>
&gt; +static bool passphrase_requested =3D false;<br>
<br>
No, this can't be a global variable. You need to track it in the service<br=
>
object I guess.<br>
<br>
&gt;&nbsp; <br>
&gt;&nbsp; void __connman_service_set_active_session(bool enable, GSList *l=
ist)<br>
&gt;&nbsp; {<br>
&gt; @@ -4187,6 +4188,9 @@ static bool auto_connect_service(GList *services=
,<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; continu=
e;<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp; }<br>
&gt;&nbsp; <br>
&gt; +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp; if (passphrase_requested)<br>
&gt; +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp; return true;<br>
<br>
This looks very suspiciously. The auto_connect should not be involved in<br=
>
anyway how a service is configured.<br>
<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp; if (service-&gt;pending ||<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; is_connecting(service-&gt;state) |=
|<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; is_connected(service-&gt;state)) {=
<br>
&gt; @@ -5721,6 +5725,7 @@ static void request_input_cb(struct connman_serv=
ice *service,<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp; err =3D __connman_service_set_passphrase(service, passp=
hrase);<br>
&gt;&nbsp; <br>
&gt;&nbsp;&nbsp; done:<br>
&gt; +&nbsp;&nbsp;&nbsp;&nbsp; passphrase_requested =3D false;<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (err &gt;=3D 0) {<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp; /* We forget any previous error. */<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp; set_error(service, CONNMAN_SERVICE_ERROR_UNKNOWN);<br>
&gt; @@ -6664,6 +6669,9 @@ int __connman_service_connect(struct connman_ser=
vice *service,<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (ser=
vice-&gt;hidden &amp;&amp; err !=3D -EINPROGRESS)<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; service-&gt;pending =3D pending;<b=
r>
&gt;&nbsp; <br>
&gt; +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (err =3D=3D -EINPROG=
RESS)<br>
&gt; +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp; passphrase_requested =3D true;<br>
<br>
If this is needed I think it should go inside the connman agent code. I<br>
rather not have yet another state variable inside service.<br>
<br>
Thanks,<br>
Daniel<br>
</div>
</span></font></div>
</body>
</html>

--_000_PR1PR02MB4794972610ADEE6844FCB6F393C00PR1PR02MB4794eurp_--

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

Date: Mon, 21 Dec 2020 20:06:42 +0000
From: Thomas Green <tgre...@sorenson.com>
Subject: Re: Strange connection problem
To: "connman@lists.01.org" <connman@lists.01.org>
Message-ID:  <cy4pr04mb05688f32bd4d0d458e2b47f49f...@cy4pr04mb0568.nam
        prd04.prod.outlook.com>
Content-Type: text/plain; charset="us-ascii"

Has anyone been able to look at this or my logfile?  I'm still in the dark as 
to what is going on.

Tom

On Tuesday, 15 December 2020 Thomas Green wrote:
>
> I'm having an issue that I can't currently figure out. In my application I 
> have two wireless access points that I've
> connected to previously. I've looked in their settings file, and they have 
> the proper passwords in them. I'm
> currently attached to AP 1. I disconnect it, then attempt to connect to AP 2. 
> I receive back to my registered
> agent a connection error, and the error that the service reports is 
> Input/Output error. This is typically what
> I see when I enter a bad password when I first connect to the AP. So, I 
> remove the service and try to connect
> to the original AP and I get the same Input/Output error on the AP that I was 
> previously connected to. I've
> been trying to figure this out for days, but have not yet followed why this 
> is happening. I've turned on
> debugging, and attached that log. If you could kindly help me to understand 
> what's going on, I would
> appreciate it. 
>
> TIA Tom 

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

Date: Tue, 22 Dec 2020 00:00:03 -0000
From: "* *" <des...@gmail.com>
Subject: connmanctl fails to connect to WiFi network having passwords
        ending with a backslash character
To: connman@lists.01.org
Message-ID: <20201222000003.2856.19...@ml01.vlan13.01.org>
Content-Type: text/plain; charset="utf-8"

Hello, 

I ran into the following issue with connman recently. I would have prefered to 
open a Jira ticket for that but I don't seem to be able to request access to 
https://01.org/jira/projects/CM which is rather expected though. I hope this is 
the right place to post this in this context, please someone tell me otherwise.

* Description of the issue:
connmanctl fails to connect to WiFi network having passwords ending with a 
backslash character (i.e. '\').

See the following commands entered consecutively in bash on my machine (observe 
the Passphrase value in both cat invocation on my network "settings" file):

LibreElec:~/.cache/connman/wifi_dca632348f72_50726574747920666c7920666f7220612057694669_managed_psk
 # cat settings
[wifi_dca632348f72_50726574747920666c7920666f7220612057694669_managed_psk]
Name=My wifi network
SSID=50726574747920666c7920666f7220612057694669
Frequency=5180
Favorite=true
AutoConnect=true
Modified=2020-12-15T22:28:21Z
Passphrase="kjHTJ235nnM!0\
IPv4.method=dhcp
IPv4.DHCP.LastAddress=192.168.87.29
IPv6.method=off
IPv6.privacy=disabled

LibreElec:~/.cache/connman/wifi_dca632348f72_50726574747920666c7920666f7220612057694669_managed_psk
 # connmanctl connect 
wifi_dca632348f72_50726574747920666c7920666f7220612057694669_managed_psk
Error 
/net/connman/service/wifi_dca632348f72_50726574747920666c7920666f7220612057694669_managed_psk:
 Input/output error

LibreElec:~/.cache/connman/wifi_dca632348f72_50726574747920666c7920666f7220612057694669_managed_psk
 # cat settings
[wifi_dca632348f72_50726574747920666c7920666f7220612057694669_managed_psk]
Name=My wifi network
SSID=50726574747920666c7920666f7220612057694669
Frequency=5180
Favorite=true
AutoConnect=true
Modified=2020-12-15T22:28:21Z
Passphrase="kjHTJ235nnM!0
IPv4.method=dhcp
IPv4.DHCP.LastAddress=192.168.87.29
IPv6.method=off
IPv6.privacy=disabled

The content of the setting file shown with cat differs between the 2 
invocations as the ending backslash char has been removed from the passphrase 
value in the second instance, just after trying to connect the network with 
connman.

Please note that connman connects seamlessly on another network with a simpler 
password on the very same WiFi router. Other Linux devices can connect to the 
network with a password ending with a backslash as long as they don't rely on 
connman.
Also note that most modern WiFi tools (e.g. wpa_supplicant) offer the 
possibility to store hashed passphrases rather than clear ones in their config 
files, for 2 good reasons:
1. It is safer and good practice to store a hashed password rather than a clear 
one;
2. a hash will never have any special character issue such as the one described 
in this ticket.

For the story, the reason why I fiddled with connmanctl is that the LibreElec 
OS provides a GUI for the WiFi settings (e.g. as a connectivity wizard on Kodi 
1st start) which initially failed on my network having a password ending with a 
backslash character, whereas another network on the same router with a very 
simple password connected successfuly.
As a side note, my WiFi password do start with a double quote character as well 
as ending witht a backslash. I was not specifically looking for trouble but it 
seems I have been very "unlucky" with the password generator I used at the time 
I setup the network.

I have since plugged my rPi to my network via ethernet rather than WiFi for 
bandwidth reasons so it is not a blocker to me anymore, but I believe I may not 
be the only one hitting this wall so it may worth a look into.

* Additional info:
** package version(s)
1.38 (shipped on latest LibreElec distro for raspberry pi 4)

** Steps to reproduce:
Create a WiFi configuration for a network with a password ending with a 
backslash character (i.e. Passphrase=<whatever_you_fancy>\) and try the 
commands listed above.


Cheers

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

Subject: Digest Footer

_______________________________________________
connman mailing list -- connman@lists.01.org
To unsubscribe send an email to connman-le...@lists.01.org


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

End of connman Digest, Vol 62, Issue 24
***************************************

Reply via email to