dpp-nfc: Be more graceful when wpa_supplicant is not available
Do not try to proceed with negotiated connection handover if wpa_supplicant control interface is not available. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
This commit is contained in:
parent
0b04d3c578
commit
8f96f2c3b1
1 changed files with 7 additions and 1 deletions
|
@ -154,7 +154,10 @@ def dpp_bootstrap_gen(wpas, type="qrcode", chan=None, mac=None, info=None,
|
|||
if mac:
|
||||
if mac is True:
|
||||
mac = own_addr(wpas)
|
||||
cmd += " mac=" + mac.replace(':', '')
|
||||
if mac is None:
|
||||
print("Could not determine local MAC address for bootstrap info")
|
||||
else:
|
||||
cmd += " mac=" + mac.replace(':', '')
|
||||
if info:
|
||||
cmd += " info=" + info
|
||||
if curve:
|
||||
|
@ -197,6 +200,9 @@ def wpas_report_handover_sel(uri):
|
|||
|
||||
def dpp_handover_client(llc):
|
||||
uri = wpas_get_nfc_uri(start_listen=False)
|
||||
if uri is None:
|
||||
print("Cannot start handover client - no bootstrap URI available")
|
||||
return
|
||||
uri = ndef.UriRecord(uri)
|
||||
print("NFC URI record for DPP: " + str(uri))
|
||||
carrier = ndef.Record('application/vnd.wfa.dpp', 'A', uri.data)
|
||||
|
|
Loading…
Reference in a new issue