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]
Message-ID: <Pine.LNX.4.64.0706251636010.3137@fbirervta.pbzchgretzou.qr>
Date:	Mon, 25 Jun 2007 16:36:50 +0200 (CEST)
From:	Jan Engelhardt <jengelh@...putergmbh.de>
To:	Patrick McHardy <kaber@...sh.net>
cc:	Vasily Averin <vvs@...ru>, Eric Dumazet <dada1@...mosbay.com>,
	"David S. Miller" <davem@...emloft.net>,
	netfilter-devel@...ts.netfilter.org, rusty@...tcorp.com.au,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	devel@...nvz.org
Subject: Re: [NETFILTER] early_drop() imrovement (v3)


On Jun 25 2007 15:53, Patrick McHardy wrote:
>Vasily Averin wrote:
>> +static int early_drop(const struct nf_conntrack_tuple *orig)
>> +{
>> +	unsigned int i, hash, cnt;
>> +	int ret = 0;
>> +
>> +	hash = hash_conntrack(orig);
>> +	cnt = NF_CT_PER_BUCKET;
>> +
>> +	for (i = 0;
>> +		!ret && cnt && i < nf_conntrack_htable_size;
>> +			++i, hash = ++hash % nf_conntrack_htable_size)
>> +		ret = __early_drop(&nf_conntrack_hash[hash], &cnt);
>
>Formatting is a bit ugly, looks much nicer as:
>
>        for (i = 0; i < nf_conntrack_htable_size; i++) {
>
>                ret = __early_drop(&nf_conntrack_hash[hash], &cnt);
>                if (ret || !cnt)
>                        break;
>                hash = ++hash % nf_conntrack_htable_size;
>        }

gcc warning: operation on ‘hash’ may be undefined



	Jan
-- 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ