mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-25 00:38:24 -05:00
TDLS: Move AID=1 workaround into driver_nl80211.c
The use of AID=1 for the nl80211 dummy STA case is specific to the driver (cfg80211), so better move this into the driver wrapper instead of generic TDLS implementation. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
parent
785336998d
commit
f11b72c3e9
@ -6070,8 +6070,18 @@ static int wpa_driver_nl80211_sta_add(void *priv,
|
|||||||
wpa_hexdump(MSG_DEBUG, " * supported rates", params->supp_rates,
|
wpa_hexdump(MSG_DEBUG, " * supported rates", params->supp_rates,
|
||||||
params->supp_rates_len);
|
params->supp_rates_len);
|
||||||
if (!params->set) {
|
if (!params->set) {
|
||||||
wpa_printf(MSG_DEBUG, " * aid=%u", params->aid);
|
if (params->aid) {
|
||||||
NLA_PUT_U16(msg, NL80211_ATTR_STA_AID, params->aid);
|
wpa_printf(MSG_DEBUG, " * aid=%u", params->aid);
|
||||||
|
NLA_PUT_U16(msg, NL80211_ATTR_STA_AID, params->aid);
|
||||||
|
} else {
|
||||||
|
/*
|
||||||
|
* cfg80211 validates that AID is non-zero, so we have
|
||||||
|
* to make this a non-zero value for the TDLS case where
|
||||||
|
* a dummy STA entry is used for now.
|
||||||
|
*/
|
||||||
|
wpa_printf(MSG_DEBUG, " * aid=1 (TDLS workaround)");
|
||||||
|
NLA_PUT_U16(msg, NL80211_ATTR_STA_AID, 1);
|
||||||
|
}
|
||||||
wpa_printf(MSG_DEBUG, " * listen_interval=%u",
|
wpa_printf(MSG_DEBUG, " * listen_interval=%u",
|
||||||
params->listen_interval);
|
params->listen_interval);
|
||||||
NLA_PUT_U16(msg, NL80211_ATTR_STA_LISTEN_INTERVAL,
|
NLA_PUT_U16(msg, NL80211_ATTR_STA_LISTEN_INTERVAL,
|
||||||
|
@ -563,7 +563,7 @@ static int wpa_supplicant_tdls_peer_addset(
|
|||||||
os_memset(¶ms, 0, sizeof(params));
|
os_memset(¶ms, 0, sizeof(params));
|
||||||
|
|
||||||
params.addr = peer;
|
params.addr = peer;
|
||||||
params.aid = add ? 1 : aid;
|
params.aid = aid;
|
||||||
params.capability = capability;
|
params.capability = capability;
|
||||||
params.flags = WPA_STA_TDLS_PEER | WPA_STA_AUTHORIZED;
|
params.flags = WPA_STA_TDLS_PEER | WPA_STA_AUTHORIZED;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user