aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/config_file.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_file.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_file.c')
-rw-r--r--wpa_supplicant/config_file.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/wpa_supplicant/config_file.c b/wpa_supplicant/config_file.c
index 920bdc0..84a1ee9 100644
--- a/wpa_supplicant/config_file.c
+++ b/wpa_supplicant/config_file.c
@@ -1413,6 +1413,13 @@ static void wpa_config_write_global(FILE *f, struct wpa_config *config)
fprintf(f, "fst_priority=%d\n", config->fst_priority);
if (config->fst_llt)
fprintf(f, "fst_llt=%d\n", config->fst_llt);
+
+ if (config->gas_rand_addr_lifetime != DEFAULT_RAND_ADDR_LIFETIME)
+ fprintf(f, "gas_rand_addr_lifetime=%u\n",
+ config->gas_rand_addr_lifetime);
+ if (config->gas_rand_mac_addr)
+ fprintf(f, "gas_rand_mac_addr=%d\n", config->gas_rand_mac_addr);
+
}
#endif /* CONFIG_NO_CONFIG_WRITE */