On Sun, Feb 20, 2022 at 01:38:23AM +0100, Pablo Neira Ayuso wrote: > On Sat, Feb 19, 2022 at 02:27:51PM +0100, Phil Sutter wrote: > > 'hour' and 'day' are allowed as unqualified meta expressions, so leave > > them alone. > > Are you use? I can see time_type is by 'ct expiration'. Actually, ct expiration takes 1s, 1m, 1h and so on. > > Fixes: eae2525685252 ("scanner: limit: move to own scope") > > Signed-off-by: Phil Sutter <phil@xxxxxx> > > --- > > src/scanner.l | 8 +++++--- > > 1 file changed, 5 insertions(+), 3 deletions(-) > > > > diff --git a/src/scanner.l b/src/scanner.l > > index ce78fcd6fa995..eaf5460870a09 100644 > > --- a/src/scanner.l > > +++ b/src/scanner.l > > @@ -385,6 +385,11 @@ addrstring ({macaddr}|{ip4addr}|{ip6addr}) > > <SCANSTATE_LIMIT>{ > > "rate" { return RATE; } > > "burst" { return BURST; } > > + > > + /* time_unit */ > > + "second" { return SECOND; } > > + "minute" { return MINUTE; } > > + "week" { return WEEK; } > > } > > <SCANSTATE_CT,SCANSTATE_LIMIT,SCANSTATE_QUOTA>"over" { return OVER; } > > > > @@ -394,11 +399,8 @@ addrstring ({macaddr}|{ip4addr}|{ip6addr}) > > "until" { return UNTIL; } > > } > > > > -"second" { return SECOND; } > > -"minute" { return MINUTE; } > > "hour" { return HOUR; } > > "day" { return DAY; } > > -"week" { return WEEK; } > > > > "reject" { return _REJECT; } > > "with" { return WITH; } > > -- > > 2.34.1 > >