aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/mesh.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2016-06-18 11:05:47 (GMT)
committerJouni Malinen <j@w1.fi>2016-06-18 12:52:54 (GMT)
commit18aca1a07dfae1ea5c7661166dfba6e6dd0111aa (patch)
tree30d449482a21c2b84808a8cc061828423a5070fd /wpa_supplicant/mesh.c
parentb8b499e4a47ef16c0e6e97e2994b0ef4ed931daa (diff)
downloadhostap-18aca1a07dfae1ea5c7661166dfba6e6dd0111aa.zip
hostap-18aca1a07dfae1ea5c7661166dfba6e6dd0111aa.tar.gz
hostap-18aca1a07dfae1ea5c7661166dfba6e6dd0111aa.tar.bz2
mesh: Use ieee80211w profile parameter
This is initial step in fixing issues in how PMF configuration for RSN mesh was handled. PMF is an optional capability for mesh and it needs to be configured consistently in both hostapd structures (to get proper RSNE) and key configuration (not included in this commit). Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'wpa_supplicant/mesh.c')
-rw-r--r--wpa_supplicant/mesh.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/wpa_supplicant/mesh.c b/wpa_supplicant/mesh.c
index e9b6450..aed55da 100644
--- a/wpa_supplicant/mesh.c
+++ b/wpa_supplicant/mesh.c
@@ -66,7 +66,8 @@ void wpa_supplicant_mesh_iface_deinit(struct wpa_supplicant *wpa_s,
}
-static struct mesh_conf * mesh_config_create(struct wpa_ssid *ssid)
+static struct mesh_conf * mesh_config_create(struct wpa_supplicant *wpa_s,
+ struct wpa_ssid *ssid)
{
struct mesh_conf *conf;
@@ -82,6 +83,13 @@ static struct mesh_conf * mesh_config_create(struct wpa_ssid *ssid)
MESH_CONF_SEC_AMPE;
else
conf->security |= MESH_CONF_SEC_NONE;
+ conf->ieee80211w = ssid->ieee80211w;
+ if (conf->ieee80211w == MGMT_FRAME_PROTECTION_DEFAULT) {
+ if (wpa_s->drv_enc & WPA_DRIVER_CAPA_ENC_BIP)
+ conf->ieee80211w = wpa_s->conf->pmf;
+ else
+ conf->ieee80211w = NO_MGMT_FRAME_PROTECTION;
+ }
/* defaults */
conf->mesh_pp_id = MESH_PATH_PROTOCOL_HWMP;
@@ -175,7 +183,7 @@ static int wpa_supplicant_mesh_init(struct wpa_supplicant *wpa_s,
wpa_s->conf->dot11RSNASAERetransPeriod;
os_strlcpy(bss->conf->iface, wpa_s->ifname, sizeof(bss->conf->iface));
- mconf = mesh_config_create(ssid);
+ mconf = mesh_config_create(wpa_s, ssid);
if (!mconf)
goto out_free;
ifmsh->mconf = mconf;