From: Jouni Malinen Date: Thu, 30 Jul 2020 09:51:56 +0000 (+0300) Subject: dpp-nfc: Skip P2P management interfaces X-Git-Tag: hostap_2_10~1065 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1d3e16d0b05df3ff12a419f252782ddef9f275b6;p=thirdparty%2Fhostap.git dpp-nfc: Skip P2P management interfaces Do not try to perform DPP operations on the P2P management interface when no specific interface has been identified. Signed-off-by: Jouni Malinen --- diff --git a/wpa_supplicant/examples/dpp-nfc.py b/wpa_supplicant/examples/dpp-nfc.py index a1a542ae4..bbfc303a8 100755 --- a/wpa_supplicant/examples/dpp-nfc.py +++ b/wpa_supplicant/examples/dpp-nfc.py @@ -80,15 +80,18 @@ def wpas_connect(): return None for ctrl in ifaces: - if ifname: - if ifname not in ctrl: - continue + if ifname and ifname not in ctrl: + continue + if os.path.basename(ctrl).startswith("p2p-dev-"): + # skip P2P management interface + continue try: summary("Trying to use control interface " + ctrl) wpas = wpaspy.Ctrl(ctrl) return wpas except Exception as e: pass + summary("Could not connect to wpa_supplicant") return None def dpp_nfc_uri_process(uri):