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 01/10] vpn-agent: Implement generic D-Bus error
checker for plugins. (Daniel Wagner)
2. Re: [PATCH 02/10] vpn-provider: React to different error
types in connect_cb() (Daniel Wagner)
3. Re: [PATCH 03/10] l2tp: Use vpn-agent.c error processing for
VPN agent errors. (Daniel Wagner)
4. Re: [PATCH v2 04/10] openconnect: Use vpn-agent.c error
processing for VPN agent errors. (Daniel Wagner)
5. Re: [PATCH 05/10] pptp: Use vpn-agent.c error processing for
VPN agent errors. (Daniel Wagner)
6. Re: [PATCH v2 06/10] vpnc: Use vpn-agent.c error processing
for VPN agent errors. (Daniel Wagner)
7. Re: [PATCH 07/10] service: Implement function to set service
autoconnect value (Daniel Wagner)
8. Re: [PATCH 08/10] provider: Implement function to set VPN
service autoconnect value (Daniel Wagner)
9. Re: [PATCH 09/10] error: Implement OperationCanceled error
type (Daniel Wagner)
10. Re: [PATCH 10/10] vpn: Handle OperationCanceled D-Bus message
reply (Daniel Wagner)
11. Re: Failure state reset after wifi authentication denied
(Daniel Wagner)
----------------------------------------------------------------------
Message: 1
Date: Fri, 28 Jun 2019 12:01:46 +0200
From: Daniel Wagner <[email protected]>
To: Jussi Laakkonen <[email protected]>
Cc: [email protected]
Subject: Re: [PATCH 01/10] vpn-agent: Implement generic D-Bus error
checker for plugins.
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8; format=flowed
Hi Jussi,
On 6/24/19 4:37 PM, Jussi Laakkonen wrote:
> It is not feasible for every VPN plugin to check the errors in D-Bus
> reply sent by VPN agent in their own way. This kind of general use makes
> reacting to the canceled, timed out or no response replies sent by VPN
> agent more common and less error prone.
>
> The check function (vpn_agent_check_and_process_reply_error()) takes in
> the reply, callback to provider connect function and the pending D-Bus
> message, that will be utilized by the callback
> (vpn-provider.c:connect_cb()). This way proper notifications are passed
> forwards and appropriate reply is sent to the caller of the VPN plugin
> connection request (connmand). By sending the reply the caller
> (connmand) can then disable autoconnection from the VPN to avoid
> re-connection in case the user canceled the VPN agent dialog.
>
> The errors that are reacted to:
> - net.connman.vpn.Agent.Error.Canceled -> ECANCELED
> - org.freedesktop.DBus.Error.Timeout -> ETIMEDOUT
> - org.freedesktop.DBus.Error.NoReply -> ENOMSG
> - any other error from VPN agent is EACCES
>
> Error in VPN agent or canceling the VPN agent should not be an error in
> the VPN provider and, therefore, set the provider state to idle. Also,
> if task was already running stop it to avoid leaving VPN processes
> running.
Patch applied after removing the two DBG() statements. If you want to
log the interaction please add connman_info() or connman_warn().
Thanks,
Daniel
------------------------------
Message: 2
Date: Fri, 28 Jun 2019 12:08:07 +0200
From: Daniel Wagner <[email protected]>
To: Jussi Laakkonen <[email protected]>
Cc: [email protected]
Subject: Re: [PATCH 02/10] vpn-provider: React to different error
types in connect_cb()
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8; format=flowed
Hi Jussi,
On 6/24/19 4:37 PM, Jussi Laakkonen wrote:
> The connection callback (connect_cb()) can be called via vpn-agent.c to
> indicate that VPN agent dialog had an error or was cancelled in addition
> to calling the function via VPN plugin. Because of this the different
> error types should be handled properly.
>
> Errors:
> - EACCES is an authentication error: VPN_PROVIDER_ERROR_AUTH_FAILED.
> - ENOMSG and ETIMEDOUT are system reported errors and then the agent
> request needs to be canceled and error set unknown error.
> - ECANCELED is reported when user canceled VPN agent dialog, treat this
> as same as ECONNABORTED as the VPN may have been initialized already.
> - ECONNABORTED is set when connect_cb() is called via VPN plugin. To
> ensure that proper disconnect -> idle cycle is done both driver and
> provider are set to disconnect state and eventually killed and put to
> idle state if the provider was 1) being connected or 2) already
> connected.
> - In other cases the VPN provider is set to failure state and connect
> error is indicated.
Patch applied. I tried to come up with a better indention but failed ...
Thanks,
Daniel
------------------------------
Message: 3
Date: Fri, 28 Jun 2019 12:12:33 +0200
From: Daniel Wagner <[email protected]>
To: Jussi Laakkonen <[email protected]>
Cc: [email protected]
Subject: Re: [PATCH 03/10] l2tp: Use vpn-agent.c error processing for
VPN agent errors.
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8; format=flowed
Hi Jussi,
On 6/24/19 4:37 PM, Jussi Laakkonen wrote:
> Use vpn_agent_check_and_process_reply_error() to check and process VPN
> agent errors. Clear callback and pending D-Bus message (user_data) if
> error was processed to avoid calling the callback twice.
Applied the patch after renaming err_int to err.
Thanks,
Daniel
------------------------------
Message: 4
Date: Fri, 28 Jun 2019 12:16:37 +0200
From: Daniel Wagner <[email protected]>
To: Jussi Laakkonen <[email protected]>
Cc: [email protected]
Subject: Re: [PATCH v2 04/10] openconnect: Use vpn-agent.c error
processing for VPN agent errors.
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8; format=flowed
Hi Jussi,
On 6/25/19 4:30 PM, Jussi Laakkonen wrote:
> Use vpn_agent_check_and_process_reply_error() to check and process VPN
> agent errors. Clear callback and pending D-Bus message (user_data) if
> error was processed to avoid calling the callback twice.
Patch applied. I also rename err_int to err. I think I know why you used
err_int. Was it avoid to clash with the jump label err? Luckeliy the
compiler is not confused and we got this already in our code base :)
Thanks,
Daniel
------------------------------
Message: 5
Date: Fri, 28 Jun 2019 12:18:32 +0200
From: Daniel Wagner <[email protected]>
To: Jussi Laakkonen <[email protected]>, [email protected]
Subject: Re: [PATCH 05/10] pptp: Use vpn-agent.c error processing for
VPN agent errors.
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8; format=flowed
Hi Jussi,
On 6/24/19 4:37 PM, Jussi Laakkonen wrote:
> Use vpn_agent_check_and_process_reply_error() to check and process VPN
> agent errors. Clear callback and pending D-Bus message (user_data) if
> error was processed to avoid calling the callback twice.
Patch applied. Again with the rename err_int to err.
Thanks,
Daniel
------------------------------
Message: 6
Date: Fri, 28 Jun 2019 12:21:29 +0200
From: Daniel Wagner <[email protected]>
To: Jussi Laakkonen <[email protected]>, [email protected]
Subject: Re: [PATCH v2 06/10] vpnc: Use vpn-agent.c error processing
for VPN agent errors.
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8; format=flowed
Hi Jussi,
On 6/25/19 4:32 PM, Jussi Laakkonen wrote:
> Use vpn_agent_check_and_process_reply_error() to check and process VPN
> agent errors. Clear callback and pending D-Bus message (user_data) if
> error was processed to avoid calling the callback twice.
>
> ---
> Changes since V2:
> * If no reply received stop processing.
> * Cleanup goto err.
Patch applied (incl. err_int -> err).
Thanks,
Daniel
------------------------------
Message: 7
Date: Fri, 28 Jun 2019 12:25:09 +0200
From: Daniel Wagner <[email protected]>
To: Jussi Laakkonen <[email protected]>
Cc: [email protected]
Subject: Re: [PATCH 07/10] service: Implement function to set service
autoconnect value
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8; format=flowed
Hi Jussi,
On 6/24/19 4:37 PM, Jussi Laakkonen wrote:
> Setter function for service autoconnect value. Calls
> autoconnect_changed() if change took place. Can be used to check if the
> change was made to, e.g., trigger saving of a service.
Patch applied.
Thanks,
Daniel
------------------------------
Message: 8
Date: Fri, 28 Jun 2019 12:26:18 +0200
From: Daniel Wagner <[email protected]>
To: Jussi Laakkonen <[email protected]>
Cc: [email protected]
Subject: Re: [PATCH 08/10] provider: Implement function to set VPN
service autoconnect value
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8; format=flowed
Hi Jussi,
On 6/24/19 4:37 PM, Jussi Laakkonen wrote:
> Add connman_provider_set_autoconnect() for setting the VPN autoconnect
> value. If a change took place save the VPN service.
>
> It is imperative to save the VPN service when autoconnect changes since
> otherwise the change is done only to run-time service settings and not
> written to disk if user has canceled VPN agent dialog, for example.
> Otherwise the data within connman and service file is out of sync, and
> next restart of connman will be a race between each VPNs that were
> attempted to connect but canceled by user.
Patch applied, after..
> +void connman_provider_set_autoconnect(struct connman_provider *provider,
> + bool flag)
> +{
> + if (provider && provider->vpn_service) {
I changed this into an early leave,
if (!provider || !provider->vpn_service)
return;
which matches with the rest of the file.
Thanks,
Daniel
------------------------------
Message: 9
Date: Fri, 28 Jun 2019 12:27:13 +0200
From: Daniel Wagner <[email protected]>
To: Jussi Laakkonen <[email protected]>
Cc: [email protected]
Subject: Re: [PATCH 09/10] error: Implement OperationCanceled error
type
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8; format=flowed
Hi Jussi,
On 6/24/19 4:37 PM, Jussi Laakkonen wrote:
> ECANCELED error should be handled with ".OperationCanceled" D-Bus error
> type. This is returned, e.g., by VPN agent when user has canceled the
> dialog.
Patch applied.
Thanks,
Daniel
------------------------------
Message: 10
Date: Fri, 28 Jun 2019 12:30:54 +0200
From: Daniel Wagner <[email protected]>
To: Jussi Laakkonen <[email protected]>
Cc: [email protected]
Subject: Re: [PATCH 10/10] vpn: Handle OperationCanceled D-Bus message
reply
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8; format=flowed
Hi Jussi,
On 6/24/19 4:37 PM, Jussi Laakkonen wrote:
> OperationCanceled (ECANCELED) is returned by connman-vpnd if the VPN
> agent used to input credentials for a VPN is canceled. This needs to be
> handled in plugins/vpn.c:connect_reply() and with this error
> autoconnect should be disabled for the VPN service.
Patch applied.
So I should have picked up all 10 patches and not broken them. Fingers
crossed :)
Excellent cleanup!
Thanks,
Daniel
------------------------------
Message: 11
Date: Fri, 28 Jun 2019 12:36:30 +0200
From: Daniel Wagner <[email protected]>
To: Damien Miliche <[email protected]>
Cc: [email protected]
Subject: Re: Failure state reset after wifi authentication denied
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8; format=flowed
Hi Damien,
Sorry for the late response. I am taking a bit off right now and I am
try to stay away from the keyboard. :)
On 6/13/19 8:31 PM, Damien Miliche wrote:
> Hi,
>
>
> I found out that my connection problem has appeared after this commit:
> https://git.kernel.org/pub/scm/network/connman/connman.git/commit/?id=6245582d0dc9a3f47a6880dabf437ee7c351caef.
>
>
>
> Especially, while the message commit seems to apply to my case (status
> code 17), the piece of code in function handle_assoc_status_code is not
> applicable for triggering retries: the condition 'wifi->state ==
> G_SUPPLICANT_STATE_ASSOCIATING' is not satisfied, as the authentication
> denial happens in my case during state G_SUPPLICANT_STATE_AUTHENTICATING.
> Moreover, at that state, wpa_supplicant does not provide the
> authentication status code in the DBUS PropertyChanged signal, that
> would indicate the reason of the denial (17 -
> WLAN_STATUS_AP_UNABLE_TO_HANDLE_NEW_STA), as the assoc status code
> (AssocStatusCode) would be after a failed association.
>
> Any suggestion of how to fix this?
First, thanks for your patience and good report. It really helps to
understand what is going on.
>
> Would patching both connman and wpa_supplicant in a similar way to
> commit 6245582d0dc9a3f47a6880dabf437ee7c351caef of connman and commit
> c7fb678f3109e62af1ef39be9b12bf8370c35bde of hostapd/wpa_supplicant, but
> for CTRL-EVENT-AUTH-REJECT event / G_SUPPLICANT_STATE_AUTHENTICATING
> state, be an acceptable solution
Yes, absolutely, It looks like ConnMan and wpa_supplicant should agree
how to handle the state changes.
Thanks,
Daniel
------------------------------
Subject: Digest Footer
_______________________________________________
connman mailing list
[email protected]
https://lists.01.org/mailman/listinfo/connman
------------------------------
End of connman Digest, Vol 44, Issue 10
***************************************