wpa_supplicant: Make GAS Address3 field selection behavior configurable
IEEE Std 802.11-2012, 10.19 (Public Action frame addressing) specifies that the wildcard BSSID value is used in Public Action frames that are transmitted to a STA that is not a member of the same BSS. wpa_supplicant used to use the actual BSSID value for all such frames regardless of whether the destination STA is a member of the BSS. P2P does not follow this rule, so P2P Public Action frame construction must not be changed. However, the cases using GAS/ANQP for non-P2P purposes should follow the standard requirements. Unfortunately, there are deployed AP implementations that do not reply to a GAS request sent using the wildcard BSSID value. The previously used behavior (Address3 = AP BSSID even when not associated) continues to be the default, but the IEEE 802.11 standard compliant addressing behavior can now be configured with gas_address3=1. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
parent
739fd20cc3
commit
c86bef2913
5 changed files with 32 additions and 1 deletions
|
@ -4368,6 +4368,7 @@ static const struct global_parse_data global_fields[] = {
|
|||
{ INT_RANGE(mbo_cell_capa, MBO_CELL_CAPA_AVAILABLE,
|
||||
MBO_CELL_CAPA_NOT_SUPPORTED), 0 },
|
||||
#endif /*CONFIG_MBO */
|
||||
{ INT(gas_address3), 0 },
|
||||
};
|
||||
|
||||
#undef FUNC
|
||||
|
|
|
@ -1292,6 +1292,16 @@ struct wpa_config {
|
|||
*/
|
||||
enum mbo_cellular_capa mbo_cell_capa;
|
||||
#endif /* CONFIG_MBO */
|
||||
|
||||
/**
|
||||
* gas_address3 - GAS Address3 field behavior
|
||||
*
|
||||
* Values:
|
||||
* 0 - P2P specification (Address3 = AP BSSID)
|
||||
* 1 = IEEE 802.11 standard compliant (Address3 = Wildcard BSSID when
|
||||
* sent to not-associated AP; if associated, AP BSSID)
|
||||
*/
|
||||
int gas_address3;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -1336,6 +1336,8 @@ static void wpa_config_write_global(FILE *f, struct wpa_config *config)
|
|||
fprintf(f, "mbo_cell_capa=%u\n", config->mbo_cell_capa);
|
||||
#endif /* CONFIG_MBO */
|
||||
|
||||
if (config->gas_address3)
|
||||
fprintf(f, "gas_address3=%d\n", config->gas_address3);
|
||||
}
|
||||
|
||||
#endif /* CONFIG_NO_CONFIG_WRITE */
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
#include "common/wpa_ctrl.h"
|
||||
#include "rsn_supp/wpa.h"
|
||||
#include "wpa_supplicant_i.h"
|
||||
#include "config.h"
|
||||
#include "driver_i.h"
|
||||
#include "offchannel.h"
|
||||
#include "gas_query.h"
|
||||
|
@ -273,6 +274,10 @@ static int gas_query_tx(struct gas_query *gas, struct gas_query_pending *query,
|
|||
struct wpabuf *req, unsigned int wait_time)
|
||||
{
|
||||
int res, prot = pmf_in_use(gas->wpa_s, query->addr);
|
||||
const u8 *bssid;
|
||||
const u8 wildcard_bssid[ETH_ALEN] = {
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff
|
||||
};
|
||||
|
||||
wpa_printf(MSG_DEBUG, "GAS: Send action frame to " MACSTR " len=%u "
|
||||
"freq=%d prot=%d", MAC2STR(query->addr),
|
||||
|
@ -285,8 +290,15 @@ static int gas_query_tx(struct gas_query *gas, struct gas_query_pending *query,
|
|||
if (gas->wpa_s->max_remain_on_chan &&
|
||||
wait_time > gas->wpa_s->max_remain_on_chan)
|
||||
wait_time = gas->wpa_s->max_remain_on_chan;
|
||||
if (!gas->wpa_s->conf->gas_address3 ||
|
||||
(gas->wpa_s->current_ssid &&
|
||||
gas->wpa_s->wpa_state >= WPA_ASSOCIATED &&
|
||||
os_memcmp(query->addr, gas->wpa_s->bssid, ETH_ALEN) == 0))
|
||||
bssid = query->addr;
|
||||
else
|
||||
bssid = wildcard_bssid;
|
||||
res = offchannel_send_action(gas->wpa_s, query->freq, query->addr,
|
||||
gas->wpa_s->own_addr, query->addr,
|
||||
gas->wpa_s->own_addr, bssid,
|
||||
wpabuf_head(req), wpabuf_len(req),
|
||||
wait_time, gas_query_tx_status, 0);
|
||||
if (res == 0)
|
||||
|
|
|
@ -440,6 +440,12 @@ fast_reauth=1
|
|||
# matching network block
|
||||
#auto_interworking=0
|
||||
|
||||
# GAS Address3 field behavior
|
||||
# 0 = P2P specification (Address3 = AP BSSID); default
|
||||
# 1 = IEEE 802.11 standard compliant (Address3 = Wildcard BSSID when
|
||||
# sent to not-associated AP; if associated, AP BSSID)
|
||||
#gas_address3=0
|
||||
|
||||
# credential block
|
||||
#
|
||||
# Each credential used for automatic network selection is configured as a set
|
||||
|
|
Loading…
Reference in a new issue