Re: [nft PATCH 4/4] rule: Fix for single line ct timeout printing

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

 



On Thu, Oct 17, 2019 at 01:29:10PM +0200, Phil Sutter wrote:
> On Thu, Oct 17, 2019 at 01:14:37PM +0200, Pablo Neira Ayuso wrote:
> > On Thu, Oct 17, 2019 at 01:03:22AM +0200, Phil Sutter wrote:
> > > Commit 43ae7a48ae3de ("rule: do not print semicolon in ct timeout")
> > > removed an extra semicolon at end of line, but thereby broke single line
> > > output. The correct fix is to use opts->stmt_separator which holds
> > > either newline or semicolon chars depending on output mode.
> > 
> > What output mode this breaks? It looks indeed like I overlook
> > something while fixing up this.
> 
> It breaks syntax of monitor and echo output. We don't propagate it, but
> the goal always has been for those to print syntactically correct
> commands.
> 
> The concrete test case in tests/monitor/testcases/object.t is:
> 
> | add ct timeout ip t ctt { protocol udp; l3proto ip; policy = { unreplied : 15, replied : 12 }; }
> 
> Omitting the semicolon before 'l3proto' is illegal syntax.

Ah, the echo mode indeed. LGTM. Thanks for explaining.



[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux