ie: add group/pairwise lists of supported ciphers

The validation of these ciphers for station is done when parsing
the BSS RSNE but for AP mode there is no such validation and
potentially any supported cipher could be chosen, even if its
incompatible for the type of key.
This commit is contained in:
James Prestwood 2022-11-02 15:51:07 -07:00 committed by Denis Kenzior
parent a4678949f9
commit 5f84a78638
1 changed files with 19 additions and 0 deletions

View File

@ -401,6 +401,25 @@ static inline bool IE_CIPHER_IS_GCMP_CCMP(uint32_t cipher_suite)
IE_RSN_CIPHER_SUITE_GCMP_256);
}
#define IE_GROUP_CIPHERS \
( \
IE_RSN_CIPHER_SUITE_TKIP | \
IE_RSN_CIPHER_SUITE_CCMP | \
IE_RSN_CIPHER_SUITE_GCMP | \
IE_RSN_CIPHER_SUITE_GCMP_256 | \
IE_RSN_CIPHER_SUITE_CCMP_256 \
)
/*
* Since WEP is unsupported we can just use the group cipher list with
* "Use group cipher" appended
*/
#define IE_PAIRWISE_CIPHERS \
( \
IE_GROUP_CIPHERS | \
IE_RSN_CIPHER_SUITE_USE_GROUP_CIPHER \
)
#define IE_LEN(ie) \
((ie) ? (ie)[1] + 2 : 0)