]> git.ipfire.org Git - thirdparty/nftables.git/commit
evaluate: bail out if new flowtable does not specify hook and priority
authorPablo Neira Ayuso <pablo@netfilter.org>
Thu, 20 Apr 2023 22:37:07 +0000 (00:37 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 22 Jan 2025 23:05:41 +0000 (00:05 +0100)
commitfd1b8d5bd4e23361219525fc73a717f931500541
tree521d1b1fdcd87f426d9a365c495d6943ad6cb58c
parent161d7d39e01d16f0813daf9699fd269e135b8256
evaluate: bail out if new flowtable does not specify hook and priority

commit 5ad475fce5a138d3a8b58bde4a41b0537d15b952 upstream.

If user forgets to specify the hook and priority and the flowtable does
not exist, then bail out:

 # cat flowtable-incomplete.nft
 table t {
  flowtable f {
   devices = { lo }
  }
 }
 # nft -f /tmp/k
 flowtable-incomplete.nft:2:12-12: Error: missing hook and priority in flowtable declaration
 flowtable f {
           ^

Update one existing tests/shell to specify a hook and priority.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
src/evaluate.c
tests/shell/testcases/owner/0001-flowtable-uaf