[PATCH 2/2] [PATCH] mesh: Fix fail to resubmit mesh_group_add command

Masashi Honma masashi.honma
Fri Aug 8 00:19:10 PDT 2014


When I type these commands,

$ wpa_cli add_network
$ wpa_cli set_network 0 ssid '"commell_2X_mmm"'
$ wpa_cli set_network 0 mode 5
$ wpa_cli set_network 0 frequency 2412
$ wpa_cli set_network 0 key_mgmt SAE
$ wpa_cli mesh_group_add 0

I got this message.

mesh: passphrase for SAE is not configured
wlan1: failed to init mesh

So I configured passphrase by this command.

$ wpa_cli set_network 0 psk '"01234567"'

Then I typed this again.

$ wpa_cli mesh_group_add 0

But it result in these messages even though the mesh group was not established.

------------------
wlan1: Control interface command 'MESH_GROUP_ADD 0'
CTRL_IFACE: MESH_GROUP_ADD id=0
Already associated with the selected network - do nothing
------------------

This patch fixes this issue.

Signed-off-by: Masashi Honma <masashi.honma at gmail.com>
---
 wpa_supplicant/mesh.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/wpa_supplicant/mesh.c b/wpa_supplicant/mesh.c
index 401de40..07f1ff8 100644
--- a/wpa_supplicant/mesh.c
+++ b/wpa_supplicant/mesh.c
@@ -26,6 +26,7 @@ wpa_supplicant_mesh_deinit(struct wpa_supplicant *wpa_s)
 	if (wpa_s->mesh_rsn)
 		os_free(wpa_s->mesh_rsn);
 	wpa_s->mesh_rsn = NULL;
+	wpa_s->current_ssid = NULL;
 	/* TODO: leave mesh (stop beacon). This will happen on link down
 	 * anyway, so it's not urgent */
 }
@@ -292,6 +293,7 @@ int wpa_supplicant_join_mesh(struct wpa_supplicant *wpa_s,
 
 	if (wpa_supplicant_mesh_init(wpa_s, ssid)) {
 		wpa_msg(wpa_s, MSG_ERROR, "failed to init mesh");
+		ret = -1;
 		goto out;
 	}
 
-- 
1.9.1




More information about the Hostap mailing list