Fix country code in wpa_supplicant AP mode Country element

country[2] needs to be set to ' ' instead of left to '\0' for the case
where wpa_supplicant sets up AP mode operations and includes the Country
element. Currently, this would be only for DFS channels. Without this,
the Beacon frames would go out with incorrect third octet in the country
code.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
Jouni Malinen 2017-01-12 12:24:08 +02:00 committed by Jouni Malinen
parent e437a5aba1
commit 8f315d0505

View file

@ -234,6 +234,7 @@ static int wpa_supplicant_conf_ap(struct wpa_supplicant *wpa_s,
conf->ieee80211d = 1;
conf->country[0] = wpa_s->conf->country[0];
conf->country[1] = wpa_s->conf->country[1];
conf->country[2] = ' ';
}
#ifdef CONFIG_P2P