]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
dpp-nfc: Fix regression in NFC Tag writing
authorJouni Malinen <jouni@codeaurora.org>
Thu, 23 Jul 2020 08:32:21 +0000 (11:32 +0300)
committerJouni Malinen <j@w1.fi>
Thu, 23 Jul 2020 08:32:21 +0000 (11:32 +0300)
The change to checking DPP_LISTEN return value ended up overwriting the
actual URI information from wpas_get_nfc_uri().

Fixes: 288c0ffaaa27 ("dpp-nfc: Do not hardcode netrole for NFC Tag writing cases")
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
wpa_supplicant/examples/dpp-nfc.py

index 8bf219a0614e9e0f0febd100680cfcde5b9b7d38..c5073df5c922997a873a124a8d3a0768882414ca 100755 (executable)
@@ -211,8 +211,8 @@ def wpas_get_nfc_uri(start_listen=True, pick_channel=False, chan_override=None):
         global netrole
         if netrole:
             cmd += " netrole=" + netrole
-        res = wpas.request(cmd)
-        if "OK" not in res:
+        res2 = wpas.request(cmd)
+        if "OK" not in res2:
             raise Exception("Failed to start listen operation (%s)" % cmd)
     return res