From 2ec115bb64f8f2abd435d0fba2579d928ef21a79 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Thu, 10 Feb 2011 18:07:04 -0600 Subject: [PATCH] vpn: clear secrets after successful activation We're already connected; shouldn't need secrets again but if we do, we'll ask for them again. Fixes an issue where reconnect would use an old one-time-password. --- src/vpn-manager/nm-vpn-connection.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/vpn-manager/nm-vpn-connection.c b/src/vpn-manager/nm-vpn-connection.c index 7503d24fc8..e84c353207 100644 --- a/src/vpn-manager/nm-vpn-connection.c +++ b/src/vpn-manager/nm-vpn-connection.c @@ -984,6 +984,10 @@ connection_state_changed (NMVPNConnection *self, case NM_VPN_CONNECTION_STATE_NEED_AUTH: get_existing_secrets (self); break; + case NM_VPN_CONNECTION_STATE_ACTIVATED: + /* Secrets no longer needed now that we're connected */ + nm_connection_clear_secrets (priv->connection); + break; case NM_VPN_CONNECTION_STATE_DISCONNECTED: case NM_VPN_CONNECTION_STATE_FAILED: if (priv->proxy) {