aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/config.c
diff options
context:
space:
mode:
authorVamsi Krishna <vamsin@qti.qualcomm.com>2016-12-08 16:21:25 (GMT)
committerJouni Malinen <j@w1.fi>2017-02-07 17:41:32 (GMT)
commit1d9d21f37694d45d6d885745855eaf6e5f1bc284 (patch)
tree8cbd186f871bc7ef02da65f74c93a217a79bba8c /wpa_supplicant/config.c
parent8331c9b316eae90c2b1a51c219a1659b68f031a0 (diff)
downloadhostap-1d9d21f37694d45d6d885745855eaf6e5f1bc284.zip
hostap-1d9d21f37694d45d6d885745855eaf6e5f1bc284.tar.gz
hostap-1d9d21f37694d45d6d885745855eaf6e5f1bc284.tar.bz2
GAS: Add support to randomize transmitter address
Add support to send GAS requests with a randomized transmitter address if supported by the driver. The following control interface commands (and matching configuration file parameters) can be used to configure different types of randomization: "SET gas_rand_mac_addr 0" to disable randomizing TX MAC address, "SET gas_rand_mac_addr 1" to randomize the complete TX MAC address, "SET gas_rand_mac_addr 2" to randomize the TX MAC address except for OUI. A new random MAC address will be generated for every gas_rand_addr_lifetime seconds and this can be configured with "SET gas_rand_addr_lifetime <timeout>". Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'wpa_supplicant/config.c')
-rw-r--r--wpa_supplicant/config.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/wpa_supplicant/config.c b/wpa_supplicant/config.c
index bdaaa54..58ecf19 100644
--- a/wpa_supplicant/config.c
+++ b/wpa_supplicant/config.c
@@ -3748,6 +3748,7 @@ struct wpa_config * wpa_config_alloc_empty(const char *ctrl_interface,
config->ctrl_interface = os_strdup(ctrl_interface);
if (driver_param)
config->driver_param = os_strdup(driver_param);
+ config->gas_rand_addr_lifetime = DEFAULT_RAND_ADDR_LIFETIME;
return config;
}
@@ -4456,6 +4457,8 @@ static const struct global_parse_data global_fields[] = {
{ INT(gas_address3), 0 },
{ INT_RANGE(ftm_responder, 0, 1), 0 },
{ INT_RANGE(ftm_initiator, 0, 1), 0 },
+ { INT(gas_rand_addr_lifetime), 0 },
+ { INT_RANGE(gas_rand_mac_addr, 0, 2), 0 },
};
#undef FUNC