Re: [nft PATCH 03/26] scanner: Some time units are only used in limit scope

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

 



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'.

> 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
> 



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

  Powered by Linux