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:
Dan Williams 2009-10-08 23:00:01 -07:00
parent c31b3e4554
commit bc653d2225

View file

@ -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