Re: [PATCH 2/2] ctrl_iface: BSS cmd skip mesh scan info if parsing fails

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

 



On Wed, Jun 08, 2016 at 10:01:38PM +0300, Jonathan Afek wrote:
> In some cases parsing of the mesh scan info for a BSS can
> fail. One reason can be that the beacon contained malformed
> length vendor IEs which are not parsed when adding to the BSS
> table. Instead of skipping the whole BSS of the BSS
> command, just skip the mesh scan info.

Does wpas_p2p_scan_result_text() case need this treatment as well?
It has the same error handling.

>  		ie = (const u8 *) (bss + 1);
>  		ret = wpas_mesh_scan_result_text(ie, bss->ie_len, pos, end);
> -		if (ret < 0 || ret >= end - pos)
> +		if (ret >= end - pos)
>  			return 0;
> -		pos += ret;
> +		if (ret > 0)
> +			pos += ret;
>  	}
>  #endif /* CONFIG_MESH */

-- 
Bob Copeland %% http://bobcopeland.com/

_______________________________________________
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