Add OSEN to proto config field writer
This was forgotten from the OSEN addition where it was parsed, but not written to a network block. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
b908c50a81
commit
3141b82c16
1 changed files with 10 additions and 2 deletions
|
@ -438,10 +438,10 @@ static char * wpa_config_write_proto(const struct parse_data *data,
|
||||||
int first = 1, ret;
|
int first = 1, ret;
|
||||||
char *buf, *pos, *end;
|
char *buf, *pos, *end;
|
||||||
|
|
||||||
pos = buf = os_zalloc(10);
|
pos = buf = os_zalloc(20);
|
||||||
if (buf == NULL)
|
if (buf == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
end = buf + 10;
|
end = buf + 20;
|
||||||
|
|
||||||
if (ssid->proto & WPA_PROTO_WPA) {
|
if (ssid->proto & WPA_PROTO_WPA) {
|
||||||
ret = os_snprintf(pos, end - pos, "%sWPA", first ? "" : " ");
|
ret = os_snprintf(pos, end - pos, "%sWPA", first ? "" : " ");
|
||||||
|
@ -459,6 +459,14 @@ static char * wpa_config_write_proto(const struct parse_data *data,
|
||||||
first = 0;
|
first = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ssid->proto & WPA_PROTO_OSEN) {
|
||||||
|
ret = os_snprintf(pos, end - pos, "%sOSEN", first ? "" : " ");
|
||||||
|
if (ret < 0 || ret >= end - pos)
|
||||||
|
return buf;
|
||||||
|
pos += ret;
|
||||||
|
first = 0;
|
||||||
|
}
|
||||||
|
|
||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
#endif /* NO_CONFIG_WRITE */
|
#endif /* NO_CONFIG_WRITE */
|
||||||
|
|
Loading…
Reference in a new issue