mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-28 18:28:23 -05:00
tests: Add CPT parameter to WpaSupplicant asp_provision()
Add an optional CPT parameter to asp_provision() method of WpaSupplicant. Signed-off-by: Max Stepanov <Max.Stepanov@intel.com> Reviewed-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com> Reviewed-by: Ilan Peer <ilan.peer@intel.com>
This commit is contained in:
parent
88f3d7c980
commit
c1e31bdb7f
@ -1106,7 +1106,7 @@ class WpaSupplicant:
|
||||
return vals
|
||||
|
||||
def asp_provision(self, peer, adv_id, adv_mac, session_id, session_mac,
|
||||
method="1000", info="", status=None):
|
||||
method="1000", info="", status=None, cpt=None):
|
||||
if status is None:
|
||||
cmd = "P2P_ASP_PROVISION"
|
||||
params = "info='%s' method=%s" % (info, method)
|
||||
@ -1114,6 +1114,9 @@ class WpaSupplicant:
|
||||
cmd = "P2P_ASP_PROVISION_RESP"
|
||||
params = "status=%d" % status
|
||||
|
||||
if cpt is not None:
|
||||
params += " cpt=" + cpt
|
||||
|
||||
if "OK" not in self.global_request("%s %s adv_id=%s adv_mac=%s session=%d session_mac=%s %s" %
|
||||
(cmd, peer, adv_id, adv_mac, session_id, session_mac, params)):
|
||||
raise Exception("%s request failed" % cmd)
|
||||
|
Loading…
Reference in New Issue
Block a user