summaryrefslogtreecommitdiffstats
path: root/include/statement.h
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2021-06-16 00:43:46 +0200
committerFlorian Westphal <fw@strlen.de>2021-06-21 14:44:58 +0200
commit767f0af82a3896a9a643de281cb020d04a7b7cf0 (patch)
treed192453e9d0c0acdc42b3b4da9397e2d0182777b /include/statement.h
parentd70691247be78c5cb814c5ab1c4bdb5e475cec59 (diff)
parser: restrict queue num expressiveness
Else we run into trouble once we allow queue num symhash mod 4 and 1 and so on. Example problem: queue num jhash ip saddr mod 4 and 1 bypass This will fail to parse because the scanner is in the wrong state (ip, not queue), so 'bypass' is parsed as a string. Currently, while nft will eat the above just fine (minus 'bypass'), nft rejects this from the evaluation phase with Error: queue number is not constant So seems we are lucky and can restrict the supported expressions to integer and range. Furthermore, the line looks wrong because this statement: queue num jhash ip saddr mod 4 and 1 bypass doesn't specifiy a number, "queue num 4" does, or "queue num 1-2" do. For arbitrary expr support it seems sensible to enforce stricter ordering to avoid any problems with the flags, for example: queue bypass,futurekeyword to jhash ip saddr mod 42 Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'include/statement.h')
0 files changed, 0 insertions, 0 deletions