Cumulative patch from commit 204c9ac4eed9f0ad69497f2efcd0d095dfd6e61c

204c9ac Extend select_network command with freq= to reduce scan time
6a6afc0 Fix radius_example build
75aea3e Interworking: Add writing of forgotten cred parameters into config file
c880ab8 Interworking: Add GET_CRED ctrl_iface command
1619e9d Interworking: Add ctrl_iface events on cred block modifications

Change-Id: I1944c63f5e0debfc465d6852aa908748c227303a
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
diff --git a/wpa_supplicant/config_file.c b/wpa_supplicant/config_file.c
index 7394593..505d405 100644
--- a/wpa_supplicant/config_file.c
+++ b/wpa_supplicant/config_file.c
@@ -832,6 +832,32 @@
 
 	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");
+	}
 }