summaryrefslogtreecommitdiff
path: root/vpn
diff options
context:
space:
mode:
authorJukka Rissanen <jukka.rissanen@linux.intel.com>2013-02-13 15:28:58 (GMT)
committerPatrik Flykt <patrik.flykt@linux.intel.com>2013-02-19 10:51:36 (GMT)
commitdb653221c8fe867f05b5e05d47d07fe1e0e6e22a (patch)
tree5ef5a65050c0a9ece3b25effffa662928b5668bc /vpn
parent147ae125eef50c4bc37a0dea630a3ffde77211e3 (diff)
downloadconnman-db653221c8fe867f05b5e05d47d07fe1e0e6e22a.zip
connman-db653221c8fe867f05b5e05d47d07fe1e0e6e22a.tar.gz
connman-db653221c8fe867f05b5e05d47d07fe1e0e6e22a.tar.bz2
l2tp: Clear password if authentication fails
This allows plugin to query agent so that user can give correct password.
Diffstat (limited to 'vpn')
-rw-r--r--vpn/plugins/l2tp.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/vpn/plugins/l2tp.c b/vpn/plugins/l2tp.c
index e0b2b04..0a7ebf1 100644
--- a/vpn/plugins/l2tp.c
+++ b/vpn/plugins/l2tp.c
@@ -174,8 +174,14 @@ static int l2tp_notify(DBusMessage *msg, struct vpn_provider *provider)
return VPN_STATE_FAILURE;
}
- if (strcmp(reason, "auth failed") == 0)
+ if (strcmp(reason, "auth failed") == 0) {
+ DBG("authentication failure");
+
+ vpn_provider_set_string(provider, "L2TP.User", NULL);
+ vpn_provider_set_string(provider, "L2TP.Password", NULL);
+
return VPN_STATE_AUTH_FAILURE;
+ }
if (strcmp(reason, "connect"))
return VPN_STATE_DISCONNECT;