diff options
author | Jouni Malinen <jouni@qca.qualcomm.com> | 2012-03-23 16:16:25 -0700 |
---|---|---|
committer | Jouni Malinen <j@w1.fi> | 2012-03-30 11:13:25 +0300 |
commit | 17218a7babd390e3ea9b3e5b2f40602e3a6c91d9 (patch) | |
tree | dd677609b114e15a7d3db00ea98fc1f3008df7b0 /wpa_supplicant | |
parent | 08410f08b9d1ffa606315960e683925db47426c5 (diff) | |
download | external_wpa_supplicant_8_ti-17218a7babd390e3ea9b3e5b2f40602e3a6c91d9.zip external_wpa_supplicant_8_ti-17218a7babd390e3ea9b3e5b2f40602e3a6c91d9.tar.gz external_wpa_supplicant_8_ti-17218a7babd390e3ea9b3e5b2f40602e3a6c91d9.tar.bz2 |
Interworking: Add realm to the anonymous identity from realm
If the username part in the credential does not include a realm,
generate one automatically based on the configured realm information.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'wpa_supplicant')
-rw-r--r-- | wpa_supplicant/interworking.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/wpa_supplicant/interworking.c b/wpa_supplicant/interworking.c index 74dacac..5e8cf7b 100644 --- a/wpa_supplicant/interworking.c +++ b/wpa_supplicant/interworking.c @@ -793,6 +793,12 @@ int interworking_connect(struct wpa_supplicant *wpa_s, struct wpa_bss *bss) if (anon == NULL) goto fail; os_snprintf(anon, buflen, "anonymous%s", pos); + } else if (cred->realm) { + size_t buflen = 10 + os_strlen(cred->realm) + 1; + anon = os_malloc(buflen); + if (anon == NULL) + goto fail; + os_snprintf(anon, buflen, "anonymous@%s", cred->realm); } else { anon = os_strdup("anonymous"); if (anon == NULL) |