aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/config.h
diff options
context:
space:
mode:
authorJimmy Chen <jimmycmchen@google.com>2018-11-13 07:19:57 (GMT)
committerJouni Malinen <j@w1.fi>2019-01-12 15:55:42 (GMT)
commit9359cc8483eb84fbbb0a75cf64dcffd213fb412e (patch)
tree3d2b4c8ce8d985515aa8553db696b1bc763949b5 /wpa_supplicant/config.h
parent222ff97bc3107b2a2a08631453a261e047b7ddcb (diff)
downloadhostap-9359cc8483eb84fbbb0a75cf64dcffd213fb412e.zip
hostap-9359cc8483eb84fbbb0a75cf64dcffd213fb412e.tar.gz
hostap-9359cc8483eb84fbbb0a75cf64dcffd213fb412e.tar.bz2
P2P: Support random device address
To enhance privacy, generate a random device address for P2P interface. If there is no saved persistent group, it generate a new random MAC address on bringing up p2p0. If there is saved persistent group, it will use last MAC address to avoid breaking group reinvoke behavior. There are two configurations are introduced: * p2p_device_random_mac_addr enable device random MAC address feature, default disable. * p2p_device_persistent_mac_addr store last used random MAC address. Signed-off-by: Jimmy Chen <jimmycmchen@google.com>
Diffstat (limited to 'wpa_supplicant/config.h')
-rw-r--r--wpa_supplicant/config.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/wpa_supplicant/config.h b/wpa_supplicant/config.h
index 2e8e057..0d02827 100644
--- a/wpa_supplicant/config.h
+++ b/wpa_supplicant/config.h
@@ -1488,6 +1488,25 @@ struct wpa_config {
* 1 = enabled (true)
*/
int coloc_intf_reporting;
+
+ /**
+ * p2p_device_random_mac_addr - P2P Device MAC address policy default
+ *
+ * 0 = use permanent MAC address
+ * 1 = use random MAC address on creating the interface if there is no
+ * persistent groups.
+ *
+ * By default, permanent MAC address is used.
+ */
+ int p2p_device_random_mac_addr;
+
+ /**
+ * p2p_device_persistent_mac_addr - Record last used MAC address
+ *
+ * If there are saved persistent groups, P2P cannot generate another
+ * random MAC address, and need to restore to last used MAC address.
+ */
+ u8 p2p_device_persistent_mac_addr[ETH_ALEN];
};