[PATCH] Fix bss_is_ess() in case of an IBSS network

Ahmed Zaki anzaki at gmail.com
Thu Sep 12 15:04:29 PDT 2019


The check for the ESS or IBSS bits in the BSS caps is done via equality
to IEEE80211_CAP_ESS (0x01). This will only be true for AP/ESS and will
fail in case of IBSS (0x02).
---
 wpa_supplicant/events.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
index f28e4399e..c8208e53e 100644
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
@@ -906,8 +906,7 @@ static int bss_is_ess(struct wpa_bss *bss)
 			IEEE80211_CAP_DMG_AP;
 	}
 
-	return ((bss->caps & (IEEE80211_CAP_ESS | IEEE80211_CAP_IBSS)) ==
-		IEEE80211_CAP_ESS);
+	return (bss->caps & IEEE80211_CAP_ESS || bss->caps & IEEE80211_CAP_IBSS);
 }
 
 
-- 
2.17.1




More information about the Hostap mailing list