eiwd

no dbus iwd with iwctl functionality
git clone https://git.daat.foo/repos/eiwd.git
Log | Files | Refs | Submodules | README | LICENSE

commit c20828f2527fe5e97f1c2eebe65b11daa502f158
parent 2f500383637143ce67375184e049740e2471fec5
Author: James Prestwood <prestwoj@gmail.com>
Date:   Fri, 25 Feb 2022 14:03:38 -0800

station: enforce MFPR=1 for 6GHz frequencies

This adds checks if MFP is set to 0 or 1:

0 - Always fail if the frequency is 6GHz
1 - Fail if MFPC=0 and the frequency is 6GHz.
    If HW is capable set MFPR=1 for 6GHz

Diffstat:
Msrc/station.c | 25++++++++++++++++++++++++-
1 file changed, 24 insertions(+), 1 deletion(-)

diff --git a/src/station.c b/src/station.c @@ -1012,9 +1012,13 @@ static int station_build_handshake_rsn(struct handshake_state *hs, struct ie_rsn_info info; uint8_t *ap_ie; bool disable_ocv; + enum band_freq band; memset(&info, 0, sizeof(info)); + if (!band_freq_to_channel(bss->frequency, &band)) + goto not_supported; + memset(&bss_info, 0, sizeof(bss_info)); scan_bss_get_rsn_info(bss, &bss_info); @@ -1061,12 +1065,31 @@ static int station_build_handshake_rsn(struct handshake_state *hs, switch (mfp_setting) { case 0: - break; + if (band != BAND_FREQ_6_GHZ) + break; + + l_error("MFP turned off by [General].ManagementFrameProtection," + " 6GHz frequencies are disabled"); + goto not_supported; case 1: info.group_management_cipher = wiphy_select_cipher(wiphy, bss_info.group_management_cipher); info.mfpc = info.group_management_cipher != 0; + + if (band != BAND_FREQ_6_GHZ) + break; + + if (!info.mfpc) + goto not_supported; + + /* + * 802.11ax Section 12.12.2 + * The STA shall use management frame protection + * (MFPR=1) when using RSN. + */ + info.mfpr = true; + break; case 2: info.group_management_cipher =