From: Samuel Ortiz Date: Fri, 3 Jul 2009 16:45:09 +0000 (+0200) Subject: Fix handling of WEP shared key X-Git-Tag: 2.0_alpha~3627 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=299c1c383072e28853f602d4e2bb1e509fa2924d;p=framework%2Fconnectivity%2Fconnman.git 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. --- 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) {