From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Kerin Millar <kfm@plushkava.net>
Cc: Thomas Koeller <thomas@koeller.dyndns.org>, netfilter@vger.kernel.org
Subject: Re: Dropping of the end of a chain
Date: Thu, 14 Nov 2024 21:47:17 +0100 [thread overview]
Message-ID: <ZzZh1TM96YVgTl8y@calendula> (raw)
In-Reply-To: <ebdf9189-3a2e-4501-aa07-a29fbc4d713f@app.fastmail.com>
On Thu, Nov 14, 2024 at 04:26:42PM +0000, Kerin Millar wrote:
> On Thu, 14 Nov 2024, at 3:51 PM, Kerin Millar wrote:
> > On Thu, 14 Nov 2024, at 2:01 PM, Thomas Köller wrote:
> >> The nft manpage states that if the end of a chain invoked via 'goto' is
> >> reached without a verdict, 'evaluation will continue at the last chain
> >> instead of the one containing the goto statement'. I cannot make sense
> >> of this; what is the 'last chain'?
> >
> > To say "last chain" is highly ambiguous. I suggest that it be rewritten
> > as "evaluation will continue as if the invoking rule had instead
> > specified 'return' as its verdict." Such would be simple, coherent and
> > correct.
>
> I just re-read the relevant section of the manual, which is as follows.
>
> 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.
>
> I think that the language is reasonably clear as it stands, though it is lacking in punctuation. However, I can see how some readers would be thrown by the use of the world "last", particularly those that do not understand the concept of a call stack.
>
> Perhaps the following would be clearer, without unduly diminishing the technical nature of the language.
>
> goto chain Similar to jump, only the current position is not pushed to
> the call stack. Consequently, once the evaluation of the new
> new chain has concluded, evaluation shall continue as if the
> the invoking rule had instead specified 'return' as its
> verdict.
This extract is very similar to what there is in the iptables manpage:
goto chain Similar to jump, only the current position is not pushed to
the call stack. This specifies that the evaluation should
continue in the specified chain. Unlike jump, return will
not continue evaluating in this chain but instead in the chain
that called us via jump.
next prev parent reply other threads:[~2024-11-14 20:47 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-14 14:01 Dropping of the end of a chain Thomas Köller
2024-11-14 15:06 ` Daniel Lakeland
2024-11-14 15:56 ` Kerin Millar
2024-11-14 15:51 ` Kerin Millar
2024-11-14 16:26 ` Kerin Millar
2024-11-14 20:47 ` Pablo Neira Ayuso [this message]
2024-11-14 22:06 ` Kerin Millar
2024-11-14 22:40 ` Daniel Lakeland
2024-11-15 8:59 ` Pablo Neira Ayuso
2024-11-15 1:30 ` imnozi
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=ZzZh1TM96YVgTl8y@calendula \
--to=pablo@netfilter.org \
--cc=kfm@plushkava.net \
--cc=netfilter@vger.kernel.org \
--cc=thomas@koeller.dyndns.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