From: Jouni Malinen Date: Fri, 4 Apr 2014 19:57:15 +0000 (+0300) Subject: Interworking: Add writing of forgotten cred parameters into config file X-Git-Tag: hostap_2_2~395 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=75aea3e704327a1a4c1792c2fa11a653bd7c27b1;p=thirdparty%2Fhostap.git Interworking: Add writing of forgotten cred parameters into config file req_conn_capab and required_roaming_consortium parameters were not written into the cred block when requesting wpa_supplicant to write the configuration file. Signed-off-by: Jouni Malinen --- diff --git a/wpa_supplicant/config_file.c b/wpa_supplicant/config_file.c index 739459316..505d405d0 100644 --- a/wpa_supplicant/config_file.c +++ b/wpa_supplicant/config_file.c @@ -832,6 +832,32 @@ static void wpa_config_write_cred(FILE *f, struct wpa_cred *cred) if (cred->ocsp) fprintf(f, "\tocsp=%d\n", cred->ocsp); + + if (cred->num_req_conn_capab) { + for (i = 0; i < cred->num_req_conn_capab; i++) { + int *ports; + + fprintf(f, "\treq_conn_capab=%u", + cred->req_conn_capab_proto[i]); + ports = cred->req_conn_capab_port[i]; + if (ports) { + int j; + for (j = 0; ports[j] != -1; j++) { + fprintf(f, "%s%d", j > 0 ? "," : ":", + ports[j]); + } + } + fprintf(f, "\n"); + } + } + + if (cred->required_roaming_consortium_len) { + fprintf(f, "\trequired_roaming_consortium="); + for (i = 0; i < cred->required_roaming_consortium_len; i++) + fprintf(f, "%02x", + cred->required_roaming_consortium[i]); + fprintf(f, "\n"); + } }