Re: [PATCH v2 3/4] mka: remove "channel" hacks from the stack and the macsec_qca driver

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

 



On Fri, Oct 07, 2016 at 12:08:11PM +0200, Sabrina Dubroca wrote:
> diff --git a/src/drivers/driver_macsec_qca.c b/src/drivers/driver_macsec_qca.c
> +static int macsec_qca_lookup_channel(struct channel_map *map,
> +				     struct ieee802_1x_mka_sci *sci,
> +				     u32 *channel)
> +{
> +	int i;
> +
> +	for (i = 0; i < MAXSC; i++) {
> +		if (os_memcmp(&map[i].sci, sci,
> +			      sizeof(struct ieee802_1x_mka_sci))) {
> +			*channel = i;
> +			return 0;
> +		}

Is this condition really supposed to select the first mismatching sci?
Or was that supposed to be os_memcmp(...) == 0 instead to find a match?

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