tests: shell: check for removing table via handle with incorrect family
Pablo Neira Ayuso
maintainerPATCH 1/1 tests: shell: check for removing table via handle with incorrect family
This test checks for upstream commit:
f6e1532a2697 ("netfilter: nf_tables: validate family when identifying table via handle")
Signed-off-by Pablo Neira Ayuso <[email protected]>
--- tests/shell/testcases/transactions/handle_bad_family | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100755 tests/shell/testcases/transactions/handle_bad_family
tests/shell/testcases/transactions/handle_bad_family new file +9 -0
@@ -0,0 +1,9 @@ +#!/bin/bash + +NFT=nft + +HANDLE=$($NFT -a -e add table ip x | cut -d '#' -f 2 | awk '{ print $2 }' | head -1) + +# should fail +$NFT delete table inet handle $HANDLE +[ $? -ne 0 ] && exit 0
Signature · 1 line
2.30.2