blob: b2bbe37b0a6620cda0840f3251bcc530e28acc72 (
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
|
#!/bin/bash
# NFT_TEST_REQUIRES(NFT_TEST_HAVE_pipapo)
set -e
$NFT -f /dev/stdin <<EOF
table ip x {
map m {
typeof ip saddr . meta mark : verdict
flags interval
counter
elements = {
127.0.0.1-127.0.0.4 . 0x123434-0xb00122 : jump foo,
}
}
chain foo {
accept
}
}
EOF
$NFT -f /dev/stdin <<EOF
add chain ip x bar
add element ip x m { 1.2.3.4 . 42 : jump bar }
delete set ip x m
EOF
|