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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Sep 12, 2019 at 04:04:29PM -0600, Ahmed Zaki wrote:
> 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).

What do you mean with "fail" in this context? An IBSS is not an ESS, so
it sounds correct to me for bss_is_ess() to return 0 if the BSS is an
IBSS.

> diff --git 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);

This would break bss_is_ess() by making it incorrectly claim an IBSS to
be an IBSS. Please note that the only caller of bss_is_ess() used to
originally do "if (bss->caps & IEEE80211_CAP_IBSS) continue" which is
what is still happening with the current bss_is_ess() implementation
while this proposed change would negate that.

What are you trying to fix with this?

-- 
Jouni Malinen                                            PGP id EFC895FA

_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux