]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
dpp-nfc: Detect a non-NDEF tag when trying to write
authorJouni Malinen <jouni@codeaurora.org>
Thu, 23 Jul 2020 08:27:27 +0000 (11:27 +0300)
committerJouni Malinen <j@w1.fi>
Thu, 23 Jul 2020 08:27:27 +0000 (11:27 +0300)
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
wpa_supplicant/examples/dpp-nfc.py

index a9465411ef9964ac6a16e8476c402c60815cc930..8bf219a0614e9e0f0febd100680cfcde5b9b7d38 100755 (executable)
@@ -584,6 +584,9 @@ def dpp_tag_read(tag):
 
 def rdwr_connected_write_tag(tag):
     summary("Tag found - writing - " + str(tag))
+    if not tag.ndef:
+        summary("Not a formatted NDEF tag")
+        return
     if not tag.ndef.is_writeable:
         summary("Not a writable tag")
         return