netfilter.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mr Dash Four <mr.dash.four@googlemail.com>
To: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Cc: "netfilter@vger.kernel.org" <netfilter@vger.kernel.org>
Subject: Re: ipset v6.latest bugs?
Date: Wed, 27 Apr 2011 00:18:49 +0100	[thread overview]
Message-ID: <4DB752D9.9010807@googlemail.com> (raw)
In-Reply-To: <4DB6DEFD.6020101@googlemail.com>


>> Due to the restarting bug (add the first element again) and failing 
>> as it is already added, the resizing happened once.
> OK, I'll wait for this to be fixed then.
I ran into more problems, unfortunately!

This is what I executed after managing to use the same ipset revisions 
in both the kernel and userspace:

[root@test1 ~]# ipset -N test hash:net,port
[root@test1 ~]# ipset -L test
Name: test
Type: hash:net,port
Header: family inet hashsize 1024 maxelem 65536
Size in memory: 16760
References: 0
Members:

[root@test1 ~]# ipset -A test 10.4.0.0/14,1-4096
ipset v6.4: Element cannot be added to the set: it's already added

[root@test1 ~]# ipset -terse -L test
Name: test
Type: hash:net,port
Header: family inet hashsize 2048 maxelem 65536
Size in memory: 91448
References: 0

[root@test1 ~]# ipset -F test
[root@test1 ~]# ipset -A test 10.4.0.0/14,1-6144
ipset v6.4: Element cannot be added to the set: it's already added

[root@test1 ~]# ipset -F test
[root@test1 ~]# ipset -terse -L test
Name: test
Type: hash:net,port
Header: family inet hashsize 2048 maxelem 65536
Size in memory: 33144
References: 0
[root@test1 ~]# ipset -X test
[root@test1 ~]# ipset -N test hash:net,port
[root@test1 ~]# ipset -A test 10.4.0.0/14,1-5120
ipset v6.4: Element cannot be added to the set: it's already added

[root@test1 ~]# ipset -X test
[root@test1 ~]# ipset -N test hash:net,port
[root@test1 ~]# ipset -A test 10.4.0.0/14,1-4608
ipset v6.4: Element cannot be added to the set: it's already added

[root@test1 ~]# ipset -X test
[root@test1 ~]# ipset -N test hash:net,port
[root@test1 ~]# ipset -A test 10.4.0.0/14,1-4096
[root@test1 ~]# ipset -X test
[root@test1 ~]# ipset -N test hash:net,port
[root@test1 ~]# ipset -A test 10.4.0.0/14,1-4352
[root@test1 ~]# ipset -F test
[root@test1 ~]# ipset -A test 10.4.0.0/14,1-4224
[root@test1 ~]# ipset -F test
[root@test1 ~]# ipset -A test 10.4.0.0/14,1-4480
[root@test1 ~]# ipset -F test
[root@test1 ~]# ipset -A test 10.4.0.0/14,1-4544
[root@test1 ~]# ipset -F test
[root@test1 ~]# ipset -A test 10.4.0.0/14,1-4607

[root@test1 ~]# ipset -F test
[root@test1 ~]# ipset -A test 10.4.0.0/14,1-4608

[root@test1 ~]# ipset -X test
[root@test1 ~]# ipset -N test hash:net,port
[root@test1 ~]# ipset -A test 10.4.0.0/14,1-4608

[root@test1 ~]# ipset -X test
[root@test1 ~]# ipset -N test hash:net,port
[root@test1 ~]# ipset -A test 10.4.0.0/14,1-4864

[root@test1 ~]# ipset -X test
[root@test1 ~]# ipset -N test hash:net,port
[root@test1 ~]# ipset -A test 10.4.0.0/14,1-5120
ipset v6.4: Element cannot be added to the set: it's already added

[root@test1 ~]# ipset -X test
[root@test1 ~]# ipset -N test hash:net,port
[root@test1 ~]# ipset -A test 10.4.0.0/14,1-5120
ipset v6.4: Element cannot be added to the set: it's already added

[root@test1 ~]# ipset -X test
[root@test1 ~]# ipset -N test hash:net,port
[root@test1 ~]# ipset -A test 10.4.0.0/14,1-4864

[root@test1 ~]# ipset -X test
[root@test1 ~]# ipset -N test hash:net,port
[root@test1 ~]# ipset -A test 10.4.0.0/14,1-5119
ipset v6.4: Element cannot be added to the set: it's already added

[root@test1 ~]# ipset -X test
[root@test1 ~]# ipset -N test hash:net,port
[root@test1 ~]# ipset -A test 10.4.0.0/14,1-5056
ipset v6.4: Element cannot be added to the set: it's already added

[root@test1 ~]# ipset -X test
[root@test1 ~]# ipset -N test hash:net,port
[root@test1 ~]# ipset -A test 10.4.0.0/14,1-4865
ipset v6.4: Element cannot be added to the set: it's already added

[root@test1 ~]# ipset -X test
[root@test1 ~]# ipset -N test hash:net,port
[root@test1 ~]# ipset -A test 10.4.0.0/14,1-4864
ipset v6.4: Element cannot be added to the set: it's already added

[root@test1 ~]# ipset -X test
[root@test1 ~]# ipset -N test hash:net,port
[root@test1 ~]# ipset -A test 10.4.0.0/14,1-4864
ipset v6.4: Element cannot be added to the set: it's already added


As evident from the above, there seem to be some, quite frankly, bizarre 
results:

1. Even though the maxelem value is 64k I seems to be restricted to add 
the amount of elements in the set which do not require the hash value to 
more than double (that may be related to the previous bug with hash:ip 
set though).

2. Take a note when I try to add 4608 elements to the test set - I did 
that 3 times with completely different results - it seems that ipset 
triggers an error when it feels like it.

3. Following on from the previous point, when I try to add more elements 
than the established "error threshold" in point 2 above, I also get 
mixed results (attempting to add 4864 elements gives me 2 successes and 
2 failures after 4 attempts made when I re-created the test set from 
scratch).

I am a bit baffled to say the least why on one occasion I am successful 
in adding more elements while previous attempts with less elements have 
triggered an error (adding 4864 elements successfully - twice, compared 
to 4608 unsuccessfully) - there is absolutely no logic in this!

There seems to be a serious issue or am I missing a trick here?


  reply	other threads:[~2011-04-26 23:18 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-25 11:55 ipset v6.latest bugs? Mr Dash Four
2011-04-25 20:03 ` Jozsef Kadlecsik
2011-04-25 20:36   ` Mr Dash Four
2011-04-25 21:51     ` Jozsef Kadlecsik
2011-04-26  0:38       ` Mr Dash Four
2011-04-26 13:57         ` Jozsef Kadlecsik
2011-04-26 15:04           ` Mr Dash Four
2011-04-26 23:18             ` Mr Dash Four [this message]
2011-04-27  7:15               ` Jozsef Kadlecsik
2011-04-27 12:00                 ` Mr Dash Four
2011-04-27 21:27                   ` Jozsef Kadlecsik
2011-04-27 21:40                     ` Mr Dash Four

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4DB752D9.9010807@googlemail.com \
    --to=mr.dash.four@googlemail.com \
    --cc=kadlec@blackhole.kfki.hu \
    --cc=netfilter@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).