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:	Tue, 16 Feb 2010 07:43:38 -0800
From:	Joe Perches <joe@...ches.com>
To:	Patrick McHardy <kaber@...sh.net>,
	Shan Wei <shanwei@...fujitsu.com>
Cc:	davem@...emloft.net, netdev@...r.kernel.org,
	netfilter-devel@...r.kernel.org
Subject: Re: IPv6 20/62: reassembly: replace magic number with macro
 definitions

On Tue, 2010-02-16 at 15:55 +0100, Patrick McHardy wrote:
> commit 7c070aa947d1a4105742378579c267f6e7fd08a1
> Author: Shan Wei <shanwei@...fujitsu.com>
> Date:   Wed Jan 20 10:42:41 2010 +0100
> 
>     IPv6: reassembly: replace magic number with macro definitions
>     
>     Use macro to define high/low thresh value, refer to IPV6_FRAG_TIMEOUT.
>     
>     Signed-off-by: Shan Wei <shanwei@...fujitsu.com>
>     Acked-by: David S. Miller <davem@...emloft.net>
>     Signed-off-by: Patrick McHardy <kaber@...sh.net>
> 
> diff --git a/include/net/ipv6.h b/include/net/ipv6.h
> index ccab594..299bbf5 100644
> --- a/include/net/ipv6.h
> +++ b/include/net/ipv6.h
> @@ -246,6 +246,8 @@ extern int ipv6_opt_accepted(struct sock *sk, struct sk_buff *skb);
>  int ip6_frag_nqueues(struct net *net);
>  int ip6_frag_mem(struct net *net);
>  
> +#define IPV6_FRAG_HIGH_THRESH	262144		/* == 256*1024 */
> +#define IPV6_FRAG_LOW_THRESH	196608		/* == 192*1024 */
>  #define IPV6_FRAG_TIMEOUT	(60*HZ)		/* 60 seconds */

196608 isn't a number I want to remember.
Is this better as:

#define IPV6_FRAG_HIGH_THRESH	(256 * 1024)	/* 262144 */
#define IPV6_FRAG_LOW_THRESH	(192 * 1024)	/* 196608 */


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