Debian Codegraph @

tests/shell/testcases/flowtable/0015destroy_0

raw
1 #!/bin/bash -e
2
3 # NFT_TEST_REQUIRES(NFT_TEST_HAVE_destroy)
4
5 trap "ip link del dummy1" EXIT
6
7 ip link add dummy1 type dummy
8 ip link set dummy1 up
9
10 $NFT add table t
11
12 # pass for non-existent flowtable
13 $NFT destroy flowtable t f
14
15 # successfully delete existing flowtable
16 $NFT add flowtable t f '{ hook ingress priority 10; devices = { lo }; }'
17
18 $NFT 'add flowtable t f { devices = { dummy1 } ; }'
19
20 $NFT destroy flowtable t f