All of lore.kernel.org
 help / color / mirror / Atom feed
From: Phil Sutter <phil@nwl.cc>
To: Folsk Pratima <folsk0pratima@cock.li>
Cc: netfilter-devel@vger.kernel.org, Pablo Neira Ayuso <pablo@netfilter.org>
Subject: Re: Document anonymous chain creation
Date: Wed, 4 Jun 2025 18:51:23 +0200	[thread overview]
Message-ID: <aEB5i1l8C8-TK3vJ@orbyte.nwl.cc> (raw)
In-Reply-To: <20250604154604.0af22103@folsk0pratima.cock.li>

[-- Attachment #1: Type: text/plain, Size: 685 bytes --]

On Wed, Jun 04, 2025 at 03:46:04PM -0000, Folsk Pratima wrote:
> On Wed, 4 Jun 2025 15:52:35 +0200
> Phil Sutter <phil@nwl.cc> wrote:
> >Did you try requesting a user account?
> Frankly, I do not know how.

Oh, indeed. The main page merely states to send "comments" to
netfilter@vger.kernel.org list. I guess you could send diffs to page
source, but it's indeed pretty cumbersome.

Pablo, can we have moderated users? Or was moderation just too much
trouble?

> >you could add the missing documentation to nft man page and submit a
> >patch
> See the attachment.

Thanks! I think we need to update the synopsis as well. What do you
think of my extra (attached) to yours?

Cheers, Phil

[-- Attachment #2: extra.diff --]
[-- Type: text/plain, Size: 1985 bytes --]

diff --git a/doc/statements.txt b/doc/statements.txt
index 79a01384660f6..6d9db011c3fa1 100644
--- a/doc/statements.txt
+++ b/doc/statements.txt
@@ -3,8 +3,12 @@ VERDICT STATEMENT
 The verdict statement alters control flow in the ruleset and issues policy decisions for packets.
 
 [verse]
+____
 {*accept* | *drop* | *queue* | *continue* | *return*}
-{*jump* | *goto*} 'chain'
+{*jump* | *goto*} 'CHAIN'
+
+'CHAIN' := 'chain_name' | *{* 'statement' ... *}*
+____
 
 *accept* and *drop* are absolute verdicts -- they terminate ruleset evaluation immediately.
 
@@ -26,15 +30,20 @@ resumes with the next base chain hook, not the rule following the queue verdict.
 *return*:: Return from the current chain and continue evaluation at the
  next rule in the last chain. If issued in a base chain, it is equivalent to the
  base chain policy.
-*jump* 'chain':: Continue evaluation at the first rule in 'chain'. The current
+*jump* 'CHAIN':: Continue evaluation at the first rule in 'CHAIN'. The current
  position in the ruleset is pushed to a call stack and evaluation will continue
  there when the new chain is entirely evaluated or a *return* verdict is issued.
  In case an absolute verdict is issued by a rule in the chain, ruleset evaluation
  terminates immediately and the specific action is taken.
-*goto* 'chain':: Similar to *jump*, but the current position is not pushed to the
+*goto* 'CHAIN':: Similar to *jump*, but the current position is not pushed to the
  call stack, meaning that after the new chain evaluation will continue at the last
  chain instead of the one containing the goto statement.
 
+Note that an alternative to specifying the name of an existing, regular chain
+in 'CHAIN' is to specify an anonymous chain ad-hoc. Like with anonymous sets,
+it can't be referenced from another rule and will be removed along with the
+rule containing it.
+
 .Using verdict statements
 -------------------
 # process packets from eth0 and the internal network in from_lan

  reply	other threads:[~2025-06-04 16:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-04 10:29 Document anonymous chain creation Folsk Pratima
2025-06-04 13:52 ` Phil Sutter
2025-06-04 15:46   ` Folsk Pratima
2025-06-04 16:51     ` Phil Sutter [this message]
2025-06-04 17:32       ` Folsk Pratima
2025-06-04 17:57         ` Phil Sutter

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=aEB5i1l8C8-TK3vJ@orbyte.nwl.cc \
    --to=phil@nwl.cc \
    --cc=folsk0pratima@cock.li \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@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.