From 299c1c383072e28853f602d4e2bb1e509fa2924d Mon Sep 17 00:00:00 2001 From: Samuel Ortiz Date: Fri, 3 Jul 2009 18:45:09 +0200 Subject: [PATCH] Fix handling of WEP shared key For WEP, we need to specify a list of allowed authentication algorithms. Without those, wpa_supplicant will tell the driver to use an open authtnetication only. But with this list of authentication algorithms, mac80211 based drivers will try each and every one of them until one succeeds. This way we can safely associate with open and shared key WEP networks. Note that non mac80211 drivers are on their own, but at least they will now be notified of the authentication algorithms we'd like to try. --- plugins/supplicant.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/supplicant.c b/plugins/supplicant.c index d955f6f..a9cc056 100644 --- a/plugins/supplicant.c +++ b/plugins/supplicant.c @@ -747,9 +747,13 @@ static int set_network(struct supplicant_task *task, DBUS_TYPE_STRING, &passphrase); } else if (g_ascii_strcasecmp(security, "wep") == 0) { const char *key_mgmt = "NONE", *index = "0"; + const char *auth_alg = "OPEN SHARED"; connman_dbus_dict_append_variant(&dict, "key_mgmt", DBUS_TYPE_STRING, &key_mgmt); + connman_dbus_dict_append_variant(&dict, "auth_alg", + DBUS_TYPE_STRING, &auth_alg); + if (passphrase) { int size = strlen(passphrase); if (size == 10 || size == 26) { -- 2.7.4