Re: Dropping of the end of a chain

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

-- 
Kerin Millar





[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux