aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/config_winreg.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2012-11-24 20:21:29 (GMT)
committerJouni Malinen <j@w1.fi>2012-11-24 20:21:29 (GMT)
commit62d498033109e4fff00f6913bfd83f5d01ad2b14 (patch)
treed61a9cd712a5f2700e2502f369f78c6e48f9f891 /wpa_supplicant/config_winreg.c
parent368b1957a61bd0c2932c7532660dff770960047c (diff)
downloadhostap-62d498033109e4fff00f6913bfd83f5d01ad2b14.zip
hostap-62d498033109e4fff00f6913bfd83f5d01ad2b14.tar.gz
hostap-62d498033109e4fff00f6913bfd83f5d01ad2b14.tar.bz2
Allow PMF to be enabled by default
Previously, PMF (protected management frames, IEEE 802.11w) could be enabled only with a per-network parameter (ieee80211w). The new global parameter (pmf) can now be used to change the default behavior to be PMF enabled (pmf=1) or required (pmf=2) for network blocks that do not override this with the ieee80211w parameter. Signed-hostap: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'wpa_supplicant/config_winreg.c')
-rw-r--r--wpa_supplicant/config_winreg.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/wpa_supplicant/config_winreg.c b/wpa_supplicant/config_winreg.c
index 48a1a94..2750b63 100644
--- a/wpa_supplicant/config_winreg.c
+++ b/wpa_supplicant/config_winreg.c
@@ -202,6 +202,7 @@ static int wpa_config_read_global_os_version(struct wpa_config *config,
static int wpa_config_read_global(struct wpa_config *config, HKEY hk)
{
int errors = 0;
+ int val;
wpa_config_read_reg_dword(hk, TEXT("ap_scan"), &config->ap_scan);
wpa_config_read_reg_dword(hk, TEXT("fast_reauth"),
@@ -272,6 +273,8 @@ static int wpa_config_read_global(struct wpa_config *config, HKEY hk)
(int *) &config->disassoc_low_ack);
wpa_config_read_reg_dword(hk, TEXT("okc"), &config->okc);
+ wpa_config_read_reg_dword(hk, TEXT("pmf"), &val);
+ config->pmf = val;
return errors ? -1 : 0;
}
@@ -612,6 +615,7 @@ static int wpa_config_write_global(struct wpa_config *config, HKEY hk)
config->disassoc_low_ack, 0);
wpa_config_write_reg_dword(hk, TEXT("okc"), config->okc, 0);
+ wpa_config_write_reg_dword(hk, TEXT("pmf"), config->pmf, 0);
return 0;
}
@@ -913,7 +917,8 @@ static int wpa_config_write_network(HKEY hk, struct wpa_ssid *ssid, int id)
INT(disabled);
INT(peerkey);
#ifdef CONFIG_IEEE80211W
- INT(ieee80211w);
+ write_int(netw, "ieee80211w", ssid->ieee80211w,
+ MGMT_FRAME_PROTECTION_DEFAULT);
#endif /* CONFIG_IEEE80211W */
STR(id_str);