From: Radek Hladik <rhladik@tfc.cz>
To: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Cc: netfilter@lists.netfilter.org
Subject: Re: IPset_iptree with timeouts on Fedora Core 4
Date: Fri, 28 Oct 2005 02:57:16 +0200 [thread overview]
Message-ID: <4361776C.5070706@tfc.cz> (raw)
In-Reply-To: <Pine.LNX.4.58.0510272129210.2649@blackhole.kfki.hu>
Jozsef Kadlecsik wrote:
>>Oct 27 02:42:58 radek kernel: Debug: sleeping function called from
>>invalid context at mm/slab.c:2126
>>
>>
>
>Sigh. It seems I was capable to commit all possible stupid mistakes in
>iptree. Your fix is correct, expect a new release tomorrow.
>
>
Thanks a lot.
>
>
>>But iptree still had not members removed after specified timeout. I have
>>"discovered" (after reading the source code) that the iptree set need
>>to have set the default timeout value (with --timeout option). Is this
>>true or am I doing something wrong?
>>
>>
>
>That is a feature. Originally iptree did not support the timeout of the
>entries. In order to keep backward compatibility, the default (i.e no
>timeout) is preserved.
>
>
I'm afraid I wrote it a little bit confusing :(
What I mean is that when I create iptree without default timeout:
ipset -N test iptree
and now I try to add member with timeout:
ipset -A test 1.2.3.4%60
but the timeout is not working and IP 1.2.3.4 stays in the iptree
forever. According to log messages:
kernel: net/ipv4/netfilter/ip_set_iptree.c: ip_tree_gc (DBG): gc: 1 2 3
4: expires 1 jiffies 9992264
The garbage collector is called but expires value is set to 1. I think
that it is because of the line
ipt_set_iptree.c:141 dtree->expires[d] = map->timeout ? (timeout * HZ
+ jiffies) : 1;
which sets expires to 1 when adding member with timeout to non-timeout
iptree. I think it would not break backward compatibility as old
commands do not use the ip%timeout notation.
And I've found another issue I want to ask about. Is there any
possibility to set timeout different from default timeout via ipt_SET
target?
Radek
next prev parent reply other threads:[~2005-10-28 0:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-27 2:56 IPset_iptree with timeouts on Fedora Core 4 Radek Hladik
2005-10-27 19:34 ` Jozsef Kadlecsik
2005-10-28 0:57 ` Radek Hladik [this message]
2005-10-28 13:24 ` Jozsef Kadlecsik
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=4361776C.5070706@tfc.cz \
--to=rhladik@tfc.cz \
--cc=kadlec@blackhole.kfki.hu \
--cc=netfilter@lists.netfilter.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.