[PATCH v2 13/20] wpa_supplicant: implement mesh scanning

Jouni Malinen j
Tue Dec 16 10:04:38 PST 2014


On Mon, Sep 01, 2014 at 12:23:32AM -0400, Bob Copeland wrote:
> When mesh is configured in, include the wildcard
> mesh id so that mesh networks are returned.  Tag any
> returned mesh networks with [MESH].

Somehow I missed that this adds the Mesh ID element unconditionally to
every Probe Request frame:

> +void wpa_supplicant_mesh_add_scan_ie(struct wpa_supplicant *wpa_s,
> +				     struct wpabuf **extra_ie)
> +{
> +	/* EID + 0-length (wildcard) mesh-id */
> +	size_t ielen = 2;
> +
> +	if (wpabuf_resize(extra_ie, ielen) == 0) {
> +		wpabuf_put_u8(*extra_ie, WLAN_EID_MESH_ID);
> +		wpabuf_put_u8(*extra_ie, 0);
> +	}
> +}

> @@ -453,6 +454,10 @@ static struct wpabuf * wpa_supplicant_extra_ies(struct wpa_supplicant *wpa_s)
> +#ifdef CONFIG_MESH
> +	wpa_supplicant_mesh_add_scan_ie(wpa_s, &extra_ie);
> +#endif /* CONFIG_MESH */


This does not look reasonable taken into account that most scans are not
trying to find mesh BSSes, so I'm hoping to add something as a condition
for this addition. Would there be any suggestions on what that condition
would be? An enabled mesh network configured? Something specified with
the SCAN command as an option if no such network is included? Something
else?
 
-- 
Jouni Malinen                                            PGP id EFC895FA



More information about the Hostap mailing list