[PATCH] Enable parsing of multiple ciphers.

Lukasz Kucharczyk lukasz.kucharczyk at tieto.com
Mon Apr 23 08:56:17 EDT 2012


It was impossible to set multiple cipher using wpa_cli as
set_network command takes exactly 3 parameters. E.g.: with
this change, following command will be accepted by wpa_cli:

set_network 0 pairwise "CCMP TKIP"

Signed-hostap: Lukasz Kucharczyk <lukasz.kucharczyk at tieto.com>
---
 wpa_supplicant/config.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/wpa_supplicant/config.c b/wpa_supplicant/config.c
index c423bc3..ba676c0 100644
--- a/wpa_supplicant/config.c
+++ b/wpa_supplicant/config.c
@@ -833,12 +833,13 @@ static int wpa_config_parse_auth_alg(const struct parse_data *data,
 	start = buf;
 
 	while (*start != '\0') {
-		while (*start == ' ' || *start == '\t')
+		while (*start == ' ' || *start == '\t' || *start == '"')
 			start++;
 		if (*start == '\0')
 			break;
 		end = start;
-		while (*end != ' ' && *end != '\t' && *end != '\0')
+		while (*end != ' ' && *end != '\t' && *end != '\0' &&
+		       *end != '"')
 			end++;
 		last = *end == '\0';
 		*end = '\0';
-- 
1.7.0.4



More information about the HostAP mailing list