Re: [PATCH 10/18] bss: Parse and store MLD address of the AP from ML IE

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

 



On Thu, Jul 28, 2022 at 07:15:39PM +0530, Veerendranath Jakkam wrote:
> Parse ML IE received in scan result to get AP MLD address and cache it
> in wpa_bss structure.

> diff --git a/wpa_supplicant/bss.c b/wpa_supplicant/bss.c
> @@ -483,11 +492,19 @@ static struct wpa_bss * wpa_bss_add(struct wpa_supplicant *wpa_s,

> +	extra[0] = '\0';
> +	pos = extra;
> +	len = sizeof(extra);
>  	if (!is_zero_ether_addr(bss->hessid))
> -		os_snprintf(extra, sizeof(extra), " HESSID " MACSTR,
> -			    MAC2STR(bss->hessid));
> -	else
> -		extra[0] = '\0';
> +		ret = os_snprintf(pos, extra + len - pos, " HESSID " MACSTR,
> +				  MAC2STR(bss->hessid));
> +
> +	if (!is_zero_ether_addr(bss->mld_addr) &&
> +	    !os_snprintf_error(extra + len - pos, ret))
> +		ret = os_snprintf(pos, extra + len - pos, " MLD ADDR " MACSTR,
> +				  MAC2STR(bss->mld_addr));

Wouldn't this "MLD ADDR" entry override the HESSID entry since the pos
pointer was not updated after the first print?

-- 
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