From: Chengyi Zhao <[email protected]>

The WEP mode is specified, and has not 4way-handshake,
so wpa_supplicant does not provide any "invalid key message".

For using the user passphrase, when user connectes the WEP mode AP
ConnMan need to requst the passphrase from the Agent.

And this commit can fix the following issue:
Unable to connect with the WEP mode AP again with correct passphrase
if connecting the AP with wrong passphrase before.
---
 src/service.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/service.c b/src/service.c
index 33cce14..c0ea7c5 100644
--- a/src/service.c
+++ b/src/service.c
@@ -5120,6 +5120,7 @@ static void request_input_cb(struct connman_service 
*service,
                /* We forget any previous error. */
                set_error(service, CONNMAN_SERVICE_ERROR_UNKNOWN);
 
+               service->userconnect = FALSE;
                __connman_service_connect(service);
 
        } else if (err == -ENOKEY) {
@@ -5923,7 +5924,11 @@ int __connman_service_connect(struct connman_service 
*service)
                if (!is_ipconfig_usable(service))
                        return -ENOLINK;
 
-               err = service_connect(service);
+               if (service->userconnect &&
+                       service->security == CONNMAN_SERVICE_SECURITY_WEP) {
+                               err = -ENOKEY;
+               } else
+                       err = service_connect(service);
        }
 
        if (err >= 0) {
-- 
1.8.1.2

_______________________________________________
connman mailing list
[email protected]
https://lists.connman.net/mailman/listinfo/connman

Reply via email to