On Thu, Jun 23, 2022 at 04:28:43PM +0200, Phil Sutter wrote: > This reverts commit df4ee3171f3e3c0e85dd45d555d7d06e8c1647c5 as it > breaks ipsec expression if preceeded by a counter statement: > > | Error: syntax error, unexpected string, expecting saddr or daddr > | add rule ip ipsec-ip4 ipsec-forw counter ipsec out ip daddr 192.168.1.2 > | ^^^^^ Please add a test covering this regression case. Thanks > Signed-off-by: Phil Sutter <phil@xxxxxx> > --- > src/scanner.l | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/src/scanner.l b/src/scanner.l > index 7eb74020ef848..6d6396bbb7413 100644 > --- a/src/scanner.l > +++ b/src/scanner.l > @@ -464,10 +464,8 @@ addrstring ({macaddr}|{ip4addr}|{ip6addr}) > "bridge" { return BRIDGE; } > > "ether" { scanner_push_start_cond(yyscanner, SCANSTATE_ETH); return ETHER; } > -<SCANSTATE_ARP,SCANSTATE_CT,SCANSTATE_ETH,SCANSTATE_IP,SCANSTATE_IP6,SCANSTATE_EXPR_FIB,SCANSTATE_EXPR_IPSEC>{ > - "saddr" { return SADDR; } > - "daddr" { return DADDR; } > -} > +"saddr" { return SADDR; } > +"daddr" { return DADDR; } > "type" { scanner_push_start_cond(yyscanner, SCANSTATE_TYPE); return TYPE; } > "typeof" { return TYPEOF; } > > -- > 2.34.1 >