[PATCH v3 20/21] l2tp: Clear password when disconnecting

Jukka Rissanen jukka.rissanen at linux.intel.com
Fri Nov 30 01:30:53 PST 2012


---
 vpn/plugins/l2tp.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/vpn/plugins/l2tp.c b/vpn/plugins/l2tp.c
index d7439cd..379447b 100644
--- a/vpn/plugins/l2tp.c
+++ b/vpn/plugins/l2tp.c
@@ -743,12 +743,18 @@ static int l2tp_error_code(int exit_code)
 	}
 }
 
+static void l2tp_disconnect(struct vpn_provider *provider)
+{
+	vpn_provider_set_string(provider, "L2TP.Password", NULL);
+}
+
 static struct vpn_driver vpn_driver = {
 	.flags		= VPN_FLAG_NO_TUN,
 	.notify		= l2tp_notify,
 	.connect	= l2tp_connect,
 	.error_code	= l2tp_error_code,
 	.save		= l2tp_save,
+	.disconnect	= l2tp_disconnect,
 };
 
 static int l2tp_init(void)
-- 
1.7.11.4




More information about the connman mailing list