summaryrefslogtreecommitdiffstats
path: root/tests/shell/testcases/flowtable/0015destroy_0
blob: cea33524831f377e6b73ffe15b8ea5534459b86f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/bash -e

# NFT_TEST_REQUIRES(NFT_TEST_HAVE_destroy)

trap "ip link del dummy1" EXIT

ip link add dummy1 type dummy
ip link set dummy1 up

$NFT add table t

# pass for non-existent flowtable
$NFT destroy flowtable t f

# successfully delete existing flowtable
$NFT add flowtable t f '{ hook ingress priority 10; devices = { lo }; }'

$NFT 'add flowtable t f { devices = { dummy1 } ; }'

$NFT destroy flowtable t f