Add support for hidden SSID in wpa_supplicant AP mode

This also disables WPS support if hidden SSID is enabled in AP mode.

Signed-off-by: Vivek Natarajan <nataraja@qca.qualcomm.com>
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
Vivek Natarajan 2012-02-27 16:28:45 +02:00 committed by Jouni Malinen
parent 1d4839ee85
commit e62f4ed0df
3 changed files with 21 additions and 1 deletions

View file

@ -145,6 +145,8 @@ static int wpa_supplicant_conf_ap(struct wpa_supplicant *wpa_s,
bss->ssid.ssid_len = ssid->ssid_len;
bss->ssid.ssid_set = 1;
bss->ignore_broadcast_ssid = ssid->ignore_broadcast_ssid;
if (ssid->auth_alg)
bss->auth_algs = ssid->auth_alg;
@ -238,7 +240,10 @@ static int wpa_supplicant_conf_ap(struct wpa_supplicant *wpa_s,
* configuration */
#endif /* CONFIG_WPS2 */
bss->eap_server = 1;
bss->wps_state = 2;
if (!ssid->ignore_broadcast_ssid)
bss->wps_state = 2;
bss->ap_setup_locked = 2;
if (wpa_s->conf->config_methods)
bss->config_methods = os_strdup(wpa_s->conf->config_methods);

View file

@ -1589,6 +1589,7 @@ static const struct parse_data ssid_fields[] = {
{ INT_RANGE(frequency, 0, 10000) },
{ INT(wpa_ptk_rekey) },
{ STR(bgscan) },
{ INT_RANGE(ignore_broadcast_ssid, 0, 2) },
#ifdef CONFIG_P2P
{ FUNC(p2p_client_list) },
#endif /* CONFIG_P2P */

View file

@ -376,6 +376,20 @@ struct wpa_ssid {
*/
char *bgscan;
/**
* ignore_broadcast_ssid - Hide SSID in AP mode
*
* Send empty SSID in beacons and ignore probe request frames that do
* not specify full SSID, i.e., require stations to know SSID.
* default: disabled (0)
* 1 = send empty (length=0) SSID in beacon and ignore probe request
* for broadcast SSID
* 2 = clear SSID (ASCII 0), but keep the original length (this may be
* required with some clients that do not support empty SSID) and
* ignore probe requests for broadcast SSID
*/
int ignore_broadcast_ssid;
/**
* freq_list - Array of allowed frequencies or %NULL for all
*