diff options
author | Jukka Rissanen <jukka.rissanen@linux.intel.com> | 2013-02-13 17:28:58 +0200 |
---|---|---|
committer | Patrik Flykt <patrik.flykt@linux.intel.com> | 2013-02-19 12:51:36 +0200 |
commit | db653221c8fe867f05b5e05d47d07fe1e0e6e22a (patch) | |
tree | 5ef5a65050c0a9ece3b25effffa662928b5668bc /vpn/plugins | |
parent | 147ae125eef50c4bc37a0dea630a3ffde77211e3 (diff) | |
download | connman-db653221c8fe867f05b5e05d47d07fe1e0e6e22a.tar.gz connman-db653221c8fe867f05b5e05d47d07fe1e0e6e22a.tar.bz2 connman-db653221c8fe867f05b5e05d47d07fe1e0e6e22a.zip |
l2tp: Clear password if authentication fails
This allows plugin to query agent so that user can give
correct password.
Diffstat (limited to 'vpn/plugins')
-rw-r--r-- | vpn/plugins/l2tp.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/vpn/plugins/l2tp.c b/vpn/plugins/l2tp.c index e0b2b04f..0a7ebf11 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; |