summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2021-03-11 14:23:12 +0100
committerFlorian Westphal <fw@strlen.de>2021-03-16 23:59:45 +0100
commit46e0b54cad76125a70184339c49cbd1dfde1c4ea (patch)
treeb2eea87a380877d478007850c441854e6d5c7b05 /src
parent87e5f35bc58450d352c303a8ff51b02193605d66 (diff)
scanner: move until,over,used keywords away from init state
Only applicable for limit and quota. "ct count" also needs 'over'. Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'src')
-rw-r--r--src/scanner.l8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/scanner.l b/src/scanner.l
index e373ff84..d09189ae 100644
--- a/src/scanner.l
+++ b/src/scanner.l
@@ -370,11 +370,13 @@ addrstring ({macaddr}|{ip4addr}|{ip6addr})
"rate" { return RATE; }
"burst" { return BURST; }
}
-"until" { return UNTIL; }
-"over" { return OVER; }
+<SCANSTATE_CT,SCANSTATE_LIMIT,SCANSTATE_QUOTA>"over" { return OVER; }
"quota" { scanner_push_start_cond(yyscanner, SCANSTATE_QUOTA); return QUOTA; }
-<SCANSTATE_QUOTA>"used" { return USED; }
+<SCANSTATE_QUOTA>{
+ "used" { return USED; }
+ "until" { return UNTIL; }
+}
"second" { return SECOND; }
"minute" { return MINUTE; }