@@ -53,6 +53,8 @@ struct p2p_device {
* from Beacon/Probe Response), the interface address is stored here.
* p2p_device_addr must still be set in such a case to the unique
* identifier for the P2P Device.
+ * This field is also used during P2PS PD in order to store the intended
+ * GO address of this device.
*/
u8 interface_addr[ETH_ALEN];
@@ -821,6 +821,10 @@ out:
dev->wps_prov_info = 0;
break;
}
+
+ if (msg.intended_addr)
+ os_memcpy(dev->interface_addr,
+ msg.intended_addr, ETH_ALEN);
}
}
p2p_parse_free(&msg);
@@ -1121,6 +1125,8 @@ void p2p_process_prov_disc_resp(struct p2p_data *p2p, const u8 *sa,
/* Store the provisioning info */
dev->wps_prov_info = msg.wps_config_methods;
+ if (msg.intended_addr)
+ os_memcpy(dev->interface_addr, msg.intended_addr, ETH_ALEN);
p2p_parse_free(&msg);
success = 1;