[PATCH 3/6] ctrl_iface: Add support to start PASN authentication with random address

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Add support to specify own address for PASN_START control interface
command.

Signed-off-by: Veerendranath Jakkam <quic_vjakkam@xxxxxxxxxxx>
---
 wpa_supplicant/ctrl_iface.c | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c
index 6588fd47b..fe79cbbce 100644
--- a/wpa_supplicant/ctrl_iface.c
+++ b/wpa_supplicant/ctrl_iface.c
@@ -11121,8 +11121,8 @@ static int wpas_ctrl_iface_configure_mscs(struct wpa_supplicant *wpa_s,
 static int wpas_ctrl_iface_pasn_start(struct wpa_supplicant *wpa_s, char *cmd)
 {
 	char *token, *context = NULL;
-	u8 bssid[ETH_ALEN];
-	int akmp = -1, cipher = -1, got_bssid = 0;
+	u8 bssid[ETH_ALEN], own_addr[ETH_ALEN];
+	int akmp = -1, cipher = -1, got_bssid = 0, got_own_addr = 0;
 	u16 group = 0xFFFF;
 	u8 *comeback = NULL;
 	size_t comeback_len = 0;
@@ -11137,6 +11137,10 @@ static int wpas_ctrl_iface_pasn_start(struct wpa_supplicant *wpa_s, char *cmd)
 			if (hwaddr_aton(token + 6, bssid))
 				goto out;
 			got_bssid = 1;
+		} else if (os_strncmp(token, "own_addr=", 9) == 0) {
+			if (hwaddr_aton(token + 9, own_addr))
+				goto out;
+			got_own_addr = 1;
 		} else if (os_strcmp(token, "akmp=PASN") == 0) {
 			akmp = WPA_KEY_MGMT_PASN;
 #ifdef CONFIG_IEEE80211R
@@ -11194,7 +11198,10 @@ static int wpas_ctrl_iface_pasn_start(struct wpa_supplicant *wpa_s, char *cmd)
 		goto out;
 	}
 
-	ret = wpas_pasn_auth_start(wpa_s, wpa_s->own_addr, bssid, akmp, cipher,
+	if (!got_own_addr)
+		os_memcpy(own_addr, wpa_s->own_addr, ETH_ALEN);
+
+	ret = wpas_pasn_auth_start(wpa_s, own_addr, bssid, akmp, cipher,
 				   group, id, comeback, comeback_len);
 out:
 	os_free(comeback);
-- 
2.25.1


_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux