Enable PMF automatically if OCV is enabled

OCV cannot be used without PMF and such a configuration were to be used
with wpa_supplicant, the AP would reject the association. hostapd is
already enabling PMF automatically whenever OCV is being enabled, so do
the same with wpa_supplicant.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
This commit is contained in:
Jouni Malinen 2022-11-24 17:16:26 +02:00 committed by Jouni Malinen
parent c823197bde
commit ca4fa867d3

View file

@ -8226,6 +8226,13 @@ int wpas_get_ssid_pmf(struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid)
return NO_MGMT_FRAME_PROTECTION;
}
#ifdef CONFIG_OCV
/* Enable PMF if OCV is being enabled */
if (wpa_s->conf->pmf == NO_MGMT_FRAME_PROTECTION &&
ssid && ssid->ocv)
return MGMT_FRAME_PROTECTION_OPTIONAL;
#endif /* CONFIG_OCV */
return wpa_s->conf->pmf;
}