[PATCH 2/3] gsupplicant: Support EAP/non-EAP differentiation in phase2 authentication methods

Henri Bragge henri.bragge at ixonos.com
Mon Jan 10 03:41:41 PST 2011


---
 gsupplicant/supplicant.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/gsupplicant/supplicant.c b/gsupplicant/supplicant.c
index 86d590f..6a57fa0 100644
--- a/gsupplicant/supplicant.c
+++ b/gsupplicant/supplicant.c
@@ -2301,7 +2301,11 @@ static void add_network_security_peap(DBusMessageIter *dict,
 
 	}
 
-	phase2_auth = g_strdup_printf("auth=%s", ssid->phase2_auth);
+	if (g_str_has_prefix(ssid->phase2_auth, "EAP-") == TRUE) {
+		phase2_auth = g_strdup_printf("autheap=%s",
+					ssid->phase2_auth + strlen("EAP-"));
+	} else
+		phase2_auth = g_strdup_printf("auth=%s", ssid->phase2_auth);
 
 	supplicant_dbus_dict_append_basic(dict, "password",
 						DBUS_TYPE_STRING,
-- 
1.7.0.4





More information about the connman mailing list