[PATCH 1/3] supplicant: Support EAP/non-EAP differentiation in phase2 authentication methods

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


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

diff --git a/plugins/supplicant.c b/plugins/supplicant.c
index 8248f85..a5c6251 100644
--- a/plugins/supplicant.c
+++ b/plugins/supplicant.c
@@ -1205,7 +1205,11 @@ static int set_network_peap(struct connman_network *network,
 		connman_info("No client certificate has been provided "
 			     "to do the PEAP/TTLS authentication\n");
 
-	phase2_auth = g_strdup_printf("auth=%s", phase2);
+	if (g_str_has_prefix(phase2, "EAP-") == TRUE) {
+		phase2_auth = g_strdup_printf("autheap=%s",
+						phase2 + strlen("EAP-"));
+	} else
+		phase2_auth = g_strdup_printf("auth=%s", phase2);
 
 	connman_dbus_dict_append_basic(dict, "password",
 						DBUS_TYPE_STRING, &passphrase);
-- 
1.7.0.4





More information about the connman mailing list