RSNO: Remove unused override element generation

The separate RSNOE/RSNO2E/RSNXOE buffers were not actually used on the
Authenticator, so remove them.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
This commit is contained in:
Jouni Malinen 2024-07-30 12:15:02 +03:00 committed by Jouni Malinen
parent 13648dde91
commit 524c452153
3 changed files with 0 additions and 80 deletions

View file

@ -885,9 +885,6 @@ void wpa_deinit(struct wpa_authenticator *wpa_auth)
os_free(wpa_auth->wpa_ie);
os_free(wpa_auth->rsne_override);
os_free(wpa_auth->rsne_override_2);
os_free(wpa_auth->rsnxe_override);
group = wpa_auth->group;
while (group) {

View file

@ -251,9 +251,6 @@ struct wpa_authenticator {
u8 *wpa_ie;
size_t wpa_ie_len;
u8 *rsne_override; /* RSNE with overridden payload */
u8 *rsne_override_2; /* RSNE with overridden (2) payload */
u8 *rsnxe_override; /* RSNXE with overridden payload */
u8 addr[ETH_ALEN];

View file

@ -810,80 +810,6 @@ done:
os_memcpy(wpa_auth->wpa_ie, buf, pos - buf);
wpa_auth->wpa_ie_len = pos - buf;
if ((wpa_auth->conf.wpa & WPA_PROTO_RSN) &&
wpa_auth->conf.rsn_override_key_mgmt) {
#ifdef CONFIG_TESTING_OPTIONS
if (wpa_auth->conf.rsnoe_override_set) {
os_memcpy(buf, wpa_auth->conf.rsnoe_override,
wpa_auth->conf.rsnoe_override_len);
res = wpa_auth->conf.rsnoe_override_len;
} else
#endif /* CONFIG_TESTING_OPTIONS */
res = wpa_write_rsne_override(&wpa_auth->conf, buf,
sizeof(buf));
if (res < 0)
return res;
os_free(wpa_auth->rsne_override);
wpa_auth->rsne_override = os_malloc(res - 4);
if (!wpa_auth->rsne_override)
return -1;
pos = wpa_auth->rsne_override;
*pos++ = WLAN_EID_RSN;
*pos++ = res - 2 - 4;
os_memcpy(pos, &buf[2 + 4], res - 2 - 4);
}
if ((wpa_auth->conf.wpa & WPA_PROTO_RSN) &&
wpa_auth->conf.rsn_override_key_mgmt_2) {
#ifdef CONFIG_TESTING_OPTIONS
if (wpa_auth->conf.rsno2e_override_set) {
os_memcpy(buf, wpa_auth->conf.rsno2e_override,
wpa_auth->conf.rsno2e_override_len);
res = wpa_auth->conf.rsno2e_override_len;
} else
#endif /* CONFIG_TESTING_OPTIONS */
res = wpa_write_rsne_override_2(&wpa_auth->conf, buf,
sizeof(buf));
if (res < 0)
return res;
os_free(wpa_auth->rsne_override_2);
wpa_auth->rsne_override_2 = os_malloc(res - 4);
if (!wpa_auth->rsne_override_2)
return -1;
pos = wpa_auth->rsne_override_2;
*pos++ = WLAN_EID_RSN;
*pos++ = res - 2 - 4;
os_memcpy(pos, &buf[2 + 4], res - 2 - 4);
}
if ((wpa_auth->conf.wpa & WPA_PROTO_RSN) &&
(wpa_auth->conf.rsn_override_key_mgmt ||
wpa_auth->conf.rsn_override_key_mgmt_2)) {
#ifdef CONFIG_TESTING_OPTIONS
if (wpa_auth->conf.rsnxoe_override_set) {
os_memcpy(buf, wpa_auth->conf.rsnxoe_override,
wpa_auth->conf.rsnxoe_override_len);
res = wpa_auth->conf.rsnxoe_override_len;
} else
#endif /* CONFIG_TESTING_OPTIONS */
res = wpa_write_rsnxe_override(&wpa_auth->conf, buf,
sizeof(buf));
if (res < 0)
return res;
os_free(wpa_auth->rsnxe_override);
if (res == 0) {
wpa_auth->rsnxe_override = NULL;
return 0;
}
wpa_auth->rsnxe_override = os_malloc(res - 4);
if (!wpa_auth->rsnxe_override)
return -1;
pos = wpa_auth->rsnxe_override;
*pos++ = WLAN_EID_RSNX;
*pos++ = res - 2 - 4;
os_memcpy(pos, &buf[2 + 4], res - 2 - 4);
}
return 0;
}