summaryrefslogtreecommitdiffstats
path: root/tests/shell/testcases/flowtable/0014addafterdelete_0
blob: 1ac651044d48f79e6bb313c32ff41aec9cc65b90 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/bash

# NFT_TEST_REQUIRES(NFT_TEST_HAVE_flowtable_counter)

set -e

RULESET='table inet filter {

    flowtable f {
        hook ingress priority filter - 1
        devices = { lo }
    }

    chain y {
        type filter hook forward priority 0;
        flow add @f counter
    }
}'

$NFT -f - <<< "$RULESET"

RULESET='delete rule inet filter y handle 3
delete flowtable inet filter f

table inet filter {
    flowtable f {
        hook ingress priority filter - 1
        devices = { lo }
        counter
    }

    chain y {
        type filter hook forward priority 0;
        flow add @f counter
    }
}'

$NFT -f - <<< "$RULESET"