hostapd: Work around an interop connection issue in FT-PSK + WPA-PSK
While the AP is configured to enable both FT-PSK and WPA-PSK, an HP printer request both AKMs (copied from AP?) in Association Request frame, but don't add MDIE and don't use FT. This results in the connection failing. Next in logs we see: RSN: Trying to use FT, but MDIE not included IE - hexdump(len=26): 30 18 01 00 00 0f ac 04 01 00 00 0f ac 04 02 00 00 0f ac 02 00 0f ac 04 00 00 This is seen with some HP and Epson printers. Work around this by stripping FT AKM(s) when MDE is not present and there is still a non-FT AKM available. Signed-off-by: Janusz Dziedzic <janusz@plumewifi.com>
This commit is contained in:
parent
2e71d0415b
commit
bb35e2d214
2 changed files with 28 additions and 6 deletions
|
@ -59,6 +59,13 @@ typedef enum { FALSE = 0, TRUE = 1 } Boolean;
|
|||
#define WPA_KEY_MGMT_DPP BIT(23)
|
||||
#define WPA_KEY_MGMT_FT_IEEE8021X_SHA384 BIT(24)
|
||||
|
||||
#define WPA_KEY_MGMT_FT (WPA_KEY_MGMT_FT_PSK | \
|
||||
WPA_KEY_MGMT_FT_IEEE8021X | \
|
||||
WPA_KEY_MGMT_FT_IEEE8021X_SHA384 | \
|
||||
WPA_KEY_MGMT_FT_SAE | \
|
||||
WPA_KEY_MGMT_FT_FILS_SHA256 | \
|
||||
WPA_KEY_MGMT_FT_FILS_SHA384)
|
||||
|
||||
static inline int wpa_key_mgmt_wpa_ieee8021x(int akm)
|
||||
{
|
||||
return !!(akm & (WPA_KEY_MGMT_IEEE8021X |
|
||||
|
@ -86,12 +93,14 @@ static inline int wpa_key_mgmt_wpa_psk(int akm)
|
|||
|
||||
static inline int wpa_key_mgmt_ft(int akm)
|
||||
{
|
||||
return !!(akm & (WPA_KEY_MGMT_FT_PSK |
|
||||
WPA_KEY_MGMT_FT_IEEE8021X |
|
||||
WPA_KEY_MGMT_FT_IEEE8021X_SHA384 |
|
||||
WPA_KEY_MGMT_FT_SAE |
|
||||
WPA_KEY_MGMT_FT_FILS_SHA256 |
|
||||
WPA_KEY_MGMT_FT_FILS_SHA384));
|
||||
return !!(akm & WPA_KEY_MGMT_FT);
|
||||
}
|
||||
|
||||
static inline int wpa_key_mgmt_only_ft(int akm)
|
||||
{
|
||||
int ft = wpa_key_mgmt_ft(akm);
|
||||
akm &= ~WPA_KEY_MGMT_FT;
|
||||
return ft && !akm;
|
||||
}
|
||||
|
||||
static inline int wpa_key_mgmt_ft_psk(int akm)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue