mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-28 10:18:21 -05:00
mesh: Implement mesh scanning
When mesh is configured in, include the wildcard mesh id so that mesh networks are returned. Signed-off-by: Javier Lopez <jlopex@gmail.com> Signed-off-by: Jason Abele <jason.abele@gmail.com>
This commit is contained in:
parent
d73b3f2ea0
commit
fbca4c893d
@ -257,6 +257,19 @@ void wpa_mesh_notify_peer(struct wpa_supplicant *wpa_s, const u8 *addr,
|
||||
}
|
||||
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int wpa_supplicant_join_mesh(struct wpa_supplicant *wpa_s,
|
||||
struct wpa_ssid *ssid)
|
||||
{
|
||||
|
@ -19,6 +19,8 @@ void wpa_supplicant_mesh_iface_deinit(struct wpa_supplicant *wpa_s,
|
||||
|
||||
void wpa_mesh_notify_peer(struct wpa_supplicant *wpa_s, const u8 *addr,
|
||||
const u8 *ies, size_t ie_len);
|
||||
void wpa_supplicant_mesh_add_scan_ie(struct wpa_supplicant *wpa_s,
|
||||
struct wpabuf **extra_ie);
|
||||
|
||||
#else /* CONFIG_MESH */
|
||||
|
||||
@ -28,6 +30,11 @@ static inline void wpa_mesh_notify_peer(struct wpa_supplicant *wpa_s,
|
||||
{
|
||||
}
|
||||
|
||||
static inline void wpa_supplicant_mesh_add_scan_ie(struct wpa_supplicant *wpa_s,
|
||||
struct wpabuf **extra_ie)
|
||||
{
|
||||
}
|
||||
|
||||
#endif /* CONFIG_MESH */
|
||||
|
||||
#endif /* MESH_H */
|
||||
|
@ -22,6 +22,7 @@
|
||||
#include "notify.h"
|
||||
#include "bss.h"
|
||||
#include "scan.h"
|
||||
#include "mesh.h"
|
||||
|
||||
|
||||
static void wpa_supplicant_gen_assoc_event(struct wpa_supplicant *wpa_s)
|
||||
@ -460,6 +461,8 @@ static struct wpabuf * wpa_supplicant_extra_ies(struct wpa_supplicant *wpa_s)
|
||||
}
|
||||
#endif /* CONFIG_P2P */
|
||||
|
||||
wpa_supplicant_mesh_add_scan_ie(wpa_s, &extra_ie);
|
||||
|
||||
#endif /* CONFIG_WPS */
|
||||
|
||||
#ifdef CONFIG_HS20
|
||||
|
Loading…
Reference in New Issue
Block a user