3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-29 13:59:24 +01:00

station: Add support for ProtocolVersion

ProtocolVersion in the EAPoL group can be used to force a particular
EAPoL version if the RADIUS server on a given network requires it
This commit is contained in:
Denis Kenzior 2019-07-16 12:00:45 -05:00
parent a1699b1587
commit 4948bfac20

View File

@ -828,9 +828,11 @@ static struct handshake_state *station_handshake_setup(struct station *station,
struct scan_bss *bss) struct scan_bss *bss)
{ {
enum security security = network_get_security(network); enum security security = network_get_security(network);
struct l_settings *settings = network_get_settings(network);
struct wiphy *wiphy = station->wiphy; struct wiphy *wiphy = station->wiphy;
struct handshake_state *hs; struct handshake_state *hs;
const char *ssid; const char *ssid;
uint32_t eapol_proto_version;
hs = netdev_handshake_state_new(station->netdev); hs = netdev_handshake_state_new(station->netdev);
@ -842,6 +844,21 @@ static struct handshake_state *station_handshake_setup(struct station *station,
ssid = network_get_ssid(network); ssid = network_get_ssid(network);
handshake_state_set_ssid(hs, (void *) ssid, strlen(ssid)); handshake_state_set_ssid(hs, (void *) ssid, strlen(ssid));
if (settings && l_settings_get_uint(settings, "EAPoL",
"ProtocolVersion",
&eapol_proto_version)) {
if (eapol_proto_version > 3) {
l_warn("Invalid ProtolVersion value - should be 0-3");
eapol_proto_version = 0;
}
if (eapol_proto_version)
l_debug("Overriding EAPoL protocol version to: %u",
eapol_proto_version);
handshake_state_set_protocol_version(hs, eapol_proto_version);
}
if (security == SECURITY_PSK) { if (security == SECURITY_PSK) {
/* SAE will generate/set the PMK */ /* SAE will generate/set the PMK */
if (IE_AKM_IS_SAE(hs->akm_suite)) { if (IE_AKM_IS_SAE(hs->akm_suite)) {