mesh: Show [MESH] flag in scan results

Signed-off-by: Javier Lopez <jlopex@gmail.com>
Signed-off-by: Jason Abele <jason.abele@gmail.com>
This commit is contained in:
Jason Abele 2014-09-01 00:23:32 -04:00 committed by Jouni Malinen
parent be6b29f63d
commit 638d945679

View file

@ -2220,8 +2220,9 @@ static int wpa_supplicant_ctrl_iface_scan_result(
{ {
char *pos, *end; char *pos, *end;
int ret; int ret;
const u8 *ie, *ie2, *p2p; const u8 *ie, *ie2, *p2p, *mesh;
mesh = wpa_bss_get_ie(bss, WLAN_EID_MESH_ID);
p2p = wpa_bss_get_vendor_ie(bss, P2P_IE_VENDOR_TYPE); p2p = wpa_bss_get_vendor_ie(bss, P2P_IE_VENDOR_TYPE);
if (!p2p) if (!p2p)
p2p = wpa_bss_get_vendor_ie_beacon(bss, P2P_IE_VENDOR_TYPE); p2p = wpa_bss_get_vendor_ie_beacon(bss, P2P_IE_VENDOR_TYPE);
@ -2242,8 +2243,10 @@ static int wpa_supplicant_ctrl_iface_scan_result(
if (ie) if (ie)
pos = wpa_supplicant_ie_txt(pos, end, "WPA", ie, 2 + ie[1]); pos = wpa_supplicant_ie_txt(pos, end, "WPA", ie, 2 + ie[1]);
ie2 = wpa_bss_get_ie(bss, WLAN_EID_RSN); ie2 = wpa_bss_get_ie(bss, WLAN_EID_RSN);
if (ie2) if (ie2) {
pos = wpa_supplicant_ie_txt(pos, end, "WPA2", ie2, 2 + ie2[1]); pos = wpa_supplicant_ie_txt(pos, end, mesh ? "RSN" : "WPA2",
ie2, 2 + ie2[1]);
}
pos = wpa_supplicant_wps_ie_txt(wpa_s, pos, end, bss); pos = wpa_supplicant_wps_ie_txt(wpa_s, pos, end, bss);
if (!ie && !ie2 && bss->caps & IEEE80211_CAP_PRIVACY) { if (!ie && !ie2 && bss->caps & IEEE80211_CAP_PRIVACY) {
ret = os_snprintf(pos, end - pos, "[WEP]"); ret = os_snprintf(pos, end - pos, "[WEP]");
@ -2251,6 +2254,12 @@ static int wpa_supplicant_ctrl_iface_scan_result(
return -1; return -1;
pos += ret; pos += ret;
} }
if (mesh) {
ret = os_snprintf(pos, end - pos, "[MESH]");
if (ret < 0 || ret >= end - pos)
return -1;
pos += ret;
}
if (bss_is_dmg(bss)) { if (bss_is_dmg(bss)) {
const char *s; const char *s;
ret = os_snprintf(pos, end - pos, "[DMG]"); ret = os_snprintf(pos, end - pos, "[DMG]");