wlantest: Allow missing RSNE in S1G beacon
S1G beacons save a few bytes by not requiring the RSNE in beacon if RSN BSS is configured. Handle this in wlantest by only clearing RSNE from the BSS info if frame is a Probe Response frame. Signed-off-by: Thomas Pedersen <thomas@adapt-ip.com>
This commit is contained in:
parent
eac2b65635
commit
be96f4e8d2
4 changed files with 15 additions and 2 deletions
|
@ -566,6 +566,11 @@ ParseRes ieee802_11_parse_elems(const u8 *start, size_t len,
|
||||||
elems->dils = pos;
|
elems->dils = pos;
|
||||||
elems->dils_len = elen;
|
elems->dils_len = elen;
|
||||||
break;
|
break;
|
||||||
|
case WLAN_EID_S1G_CAPABILITIES:
|
||||||
|
if (elen < 15)
|
||||||
|
break;
|
||||||
|
elems->s1g_capab = pos;
|
||||||
|
break;
|
||||||
case WLAN_EID_FRAGMENT:
|
case WLAN_EID_FRAGMENT:
|
||||||
ieee802_11_parse_fragment(&elems->frag_ies, pos, elen);
|
ieee802_11_parse_fragment(&elems->frag_ies, pos, elen);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -115,6 +115,7 @@ struct ieee802_11_elems {
|
||||||
const u8 *short_ssid_list;
|
const u8 *short_ssid_list;
|
||||||
const u8 *he_6ghz_band_cap;
|
const u8 *he_6ghz_band_cap;
|
||||||
const u8 *sae_pk;
|
const u8 *sae_pk;
|
||||||
|
const u8 *s1g_capab;
|
||||||
|
|
||||||
u8 ssid_len;
|
u8 ssid_len;
|
||||||
u8 supp_rates_len;
|
u8 supp_rates_len;
|
||||||
|
|
|
@ -443,7 +443,10 @@
|
||||||
#define WLAN_EID_DEVICE_LOCATION 204
|
#define WLAN_EID_DEVICE_LOCATION 204
|
||||||
#define WLAN_EID_WHITE_SPACE_MAP 205
|
#define WLAN_EID_WHITE_SPACE_MAP 205
|
||||||
#define WLAN_EID_FTM_PARAMETERS 206
|
#define WLAN_EID_FTM_PARAMETERS 206
|
||||||
|
#define WLAN_EID_S1G_BCN_COMPAT 213
|
||||||
|
#define WLAN_EID_S1G_CAPABILITIES 217
|
||||||
#define WLAN_EID_VENDOR_SPECIFIC 221
|
#define WLAN_EID_VENDOR_SPECIFIC 221
|
||||||
|
#define WLAN_EID_S1G_OPERATION 232
|
||||||
#define WLAN_EID_CAG_NUMBER 237
|
#define WLAN_EID_CAG_NUMBER 237
|
||||||
#define WLAN_EID_AP_CSN 239
|
#define WLAN_EID_AP_CSN 239
|
||||||
#define WLAN_EID_FILS_INDICATION 240
|
#define WLAN_EID_FILS_INDICATION 240
|
||||||
|
|
|
@ -178,14 +178,18 @@ void bss_update(struct wlantest *wt, struct wlantest_bss *bss,
|
||||||
elems->osen_len + 2);
|
elems->osen_len + 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (elems->rsn_ie == NULL) {
|
/* S1G does not include RSNE in beacon, so only clear it from
|
||||||
|
* Probe Response frames. Note this assumes short beacons were dropped
|
||||||
|
* due to missing SSID above.
|
||||||
|
*/
|
||||||
|
if (!elems->rsn_ie && (!elems->s1g_capab || beacon != 1)) {
|
||||||
if (bss->rsnie[0]) {
|
if (bss->rsnie[0]) {
|
||||||
add_note(wt, MSG_INFO, "BSS " MACSTR
|
add_note(wt, MSG_INFO, "BSS " MACSTR
|
||||||
" - RSN IE removed", MAC2STR(bss->bssid));
|
" - RSN IE removed", MAC2STR(bss->bssid));
|
||||||
bss->rsnie[0] = 0;
|
bss->rsnie[0] = 0;
|
||||||
update = 1;
|
update = 1;
|
||||||
}
|
}
|
||||||
} else {
|
} else if (elems->rsn_ie) {
|
||||||
if (bss->rsnie[0] == 0 ||
|
if (bss->rsnie[0] == 0 ||
|
||||||
os_memcmp(bss->rsnie, elems->rsn_ie - 2,
|
os_memcmp(bss->rsnie, elems->rsn_ie - 2,
|
||||||
elems->rsn_ie_len + 2) != 0) {
|
elems->rsn_ie_len + 2) != 0) {
|
||||||
|
|
Loading…
Reference in a new issue