]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Fix join for p2p_connect
authorIrfan Sheriff <isheriff@google.com>
Fri, 7 Sep 2012 01:30:39 +0000 (18:30 -0700)
committerJouni Malinen <j@w1.fi>
Fri, 1 Nov 2013 14:36:33 +0000 (16:36 +0200)
wps_pbc with interface command stripped out ends up as a null character.
Supplicant tries to interpret that as a bssid. Fix it to ignore null
character as empty bssid

Change-Id: Ic91d6657efaf03fbe5c4a03e9e630b4b3ff5dec4

wpa_supplicant/ctrl_iface.c

index 3b6d3677d74a7536df73f16e948bb1267f103870..8736b0761cb9505da20bb232cf8c72819b352d68 100644 (file)
@@ -640,7 +640,7 @@ static int wpa_supplicant_ctrl_iface_wps_pbc(struct wpa_supplicant *wpa_s,
        u8 *_p2p_dev_addr = NULL;
 #endif /* CONFIG_AP */
 
-       if (cmd == NULL || os_strcmp(cmd, "any") == 0) {
+       if (cmd == NULL || os_strcmp(cmd, "any") == 0 || cmd[0] == '\0') {
                _bssid = NULL;
 #ifdef CONFIG_P2P
        } else if (os_strncmp(cmd, "p2p_dev_addr=", 13) == 0) {