From 8f315d05059e397ff78ea3846cfe9565210b92da Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Thu, 12 Jan 2017 12:24:08 +0200 Subject: [PATCH] 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 --- wpa_supplicant/ap.c | 1 + 1 file changed, 1 insertion(+) diff --git a/wpa_supplicant/ap.c b/wpa_supplicant/ap.c index 5afb772ba..c594c7ebf 100644 --- a/wpa_supplicant/ap.c +++ b/wpa_supplicant/ap.c @@ -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