From: Duncan Roe <duncan_roe@optusnet.com.au>
To: netfilter@vger.kernel.org
Cc: matt-nft@mailtower.de, trentbuck@gmail.com
Subject: Re: Named sets with timeout
Date: Tue, 29 Oct 2019 12:35:53 +1100 [thread overview]
Message-ID: <20191029013553.GA1938@dimstar.local.net> (raw)
In-Reply-To: <87wocowgab.fsf@goll.lan>
On Tue, Oct 29, 2019 at 11:23:40AM +1100, Trent W. Buck wrote:
> Matt <matt-nft@mailtower.de> writes:
>
> > Then i add the following sample element to it:
> > /usr/sbin/nft add set ip filter_v4 my_drop \{type ipv4_addr \; flags
> > timeout \; elements=\{a.b.c.d timeout 600s \} \;\}
> >
> > All good so far, a.b.c.d is counting down as expected,
> > beginning with 10min.
> > But when I wait - say 1 minute and repeat the 'nft add set ... 600s'
> > command from above then the timer remains unchanged (?)
> > It looks as the timer cannot get changed anymore once it has been
> > initialized.
>
> I think you are right, but see this recent commit (in 0.9.2+):
>
> 24f33c7 2019-06-17 18:15 +0200 LGL
> src: enable set expiration date for set elements
>
> https://git.netfilter.org/nftables/commit/?id=24f33c7
>
> ...which sounds like there is a new (as-yet-undocumented?) keyword for
> changing (as opposed to initializing) the timeout of a set element.
>
It's "update"
I.e. use update instead of add got get timeout to reset.
Needs kernel 5.3 IIRC
Cheers ... Duncan.
next prev parent reply other threads:[~2019-10-29 1:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-28 20:25 Named sets with timeout Matt
2019-10-29 0:23 ` Trent W. Buck
2019-10-29 1:35 ` Duncan Roe [this message]
2019-10-29 8:00 ` Laura Garcia
2019-10-30 1:12 ` Trent W. Buck
2019-10-30 8:06 ` Laura Garcia
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=20191029013553.GA1938@dimstar.local.net \
--to=duncan_roe@optusnet.com.au \
--cc=matt-nft@mailtower.de \
--cc=netfilter@vger.kernel.org \
--cc=trentbuck@gmail.com \
/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.