lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 27 Aug 2015 15:52:39 -0700
From:	David Ahern <dsa@...ulusnetworks.com>
To:	netdev@...r.kernel.org
Subject: Re: [PATCH net-next 4/5] net: Refactor inetpeer address struct

On 8/27/15 2:16 PM, David Ahern wrote:
> @@ -124,12 +122,12 @@ static inline struct inet_peer *inet_getpeer_v6(struct inet_peer_base *base,
>   static inline int inetpeer_addr_cmp(const struct inetpeer_addr *a,
>   				    const struct inetpeer_addr *b)
>   {
> -	int i, n = (a->family == AF_INET ? 1 : 4);
> +	int i, n = (a->family == AF_INET ? sizeof(a->a4) : sizeof(a->a6));

Forgot the / by sizeof(u32) (key size) in this version of the patches. 
v2 coming.

>
>   	for (i = 0; i < n; i++) {
> -		if (a->addr.a6[i] == b->addr.a6[i])
> +		if (a->key[i] == b->key[i])
>   			continue;
> -		if ((__force u32)a->addr.a6[i] < (__force u32)b->addr.a6[i])
> +		if (a->key[i] < b->key[i])
>   			return -1;
>   		return 1;
>   	}
>

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ