public inbox for netfilter@vger.kernel.org
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: "Lars Noodén" <lars.nooden@gmx.com>
Cc: Linux Netfilter Users List <netfilter@vger.kernel.org>
Subject: Re: Wiki entry on Element timeouts in NFtables
Date: Thu, 12 Sep 2024 11:30:27 +0200	[thread overview]
Message-ID: <ZuK0s_rVYEgbQGn0@calendula> (raw)
In-Reply-To: <3235fb97-5759-4250-9129-ba8006ffd53d@gmx.com>

Hi,

On Sat, Sep 07, 2024 at 09:23:00AM +0300, Lars Noodén wrote:
> I am unclear on the differences between 'timeout' and 'expires' as
> described in the Wiki entry¹ on Element timeouts.
> 
> If 'expires' is assigned, but no 'timeout' is given, then what happens?
> Will the entry expire regardless of whether additional matching traffic
> comes in?  Why do the two examples have 'timeout' with larger values
> than the 'expires' in  both?

From timeout perspective, there are three type of sets:

1) Sets with no timeout. Adding an element with timeout results in an
   error.

2) Sets with:

        flags timeout

   that is, set supports timeouts but no default set timeout is specified
   in the declaration, in that case, if element is added with no timeout,
   then element never times out. On the other hand, elements that time out
   need an explicit "timeout" option to be used when they are added.

   The set listing always shows "timeout" and "expires" in this case.

3) Sets with default timeout, eg.

        timeout 1h

   In this case, an element that is added with no specific timeout
   uses the default set timeout and the set listing only shows
   "expires" to remove redundant "timeout" information, because
   default set timeout is assumed.

   However, it is possible to override the default set timeout, in that
   case, if element timeout is different than the default set timeout,
   then the set listing shows again both "timeout" and "expires".

   Therefore, "expires" with no "timeout" is only possible in this case,
   because "timeout" is assumed to be the default set timeout.

> ¹ https://wiki.nftables.org/wiki-nftables/index.php/Element_timeouts

      parent reply	other threads:[~2024-09-12  9:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-07  6:23 Wiki entry on Element timeouts in NFtables Lars Noodén
2024-09-08  0:07 ` Kerin Millar
2024-09-12  9:35   ` Pablo Neira Ayuso
2024-09-12 10:29     ` Pablo Neira Ayuso
2024-09-12  9:30 ` Pablo Neira Ayuso [this message]

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=ZuK0s_rVYEgbQGn0@calendula \
    --to=pablo@netfilter.org \
    --cc=lars.nooden@gmx.com \
    --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