mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-04 20:20:17 +01:00
vpn: clear secrets when the connection fails
NM previously only cleared secrets when the VPN service daemon quit, and the service daemons are on a 10-second inactivity timer. So if the user tried to re-activate the failed VPN connection within 10 seconds the old secrets would get used, which clearly isn't what we want. Ensure that whenever the VPN connection fails or disconnects, we ask the settings service for secrets again the next time.
This commit is contained in:
parent
c31b3e4554
commit
bc653d2225
1 changed files with 6 additions and 0 deletions
|
|
@ -912,6 +912,12 @@ vpn_cleanup (NMVPNConnection *connection)
|
|||
g_free (priv->tundev);
|
||||
priv->tundev = NULL;
|
||||
}
|
||||
|
||||
/* Clear out connection secrets to ensure that the settings service
|
||||
* gets asked for them next time the connection is activated.
|
||||
*/
|
||||
if (priv->connection)
|
||||
nm_connection_clear_secrets (priv->connection);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue