summaryrefslogtreecommitdiffstats
path: root/tests/files/expr-rt
blob: 4c154091cdd3f0adb7104a0b9cf12676d5744225 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#! nft -f

add table ip filter
add chain ip filter output { type filter hook output priority 0 ; }

add table ip6 filter
add chain ip6 filter output { type filter hook output priority 0 ; }

add table inet filter
add chain inet filter output { type filter hook output priority 0 ; }

# rt: classid (see /etc/iproute2/rt_realms)
add rule ip filter output rt classid cosmos counter
add rule ip6 filter output rt classid cosmos counter
add rule inet filter output rt classid cosmos counter

# rt: nexthop
add rule ip filter output rt nexthop 192.168.0.1 counter
add rule ip6 filter output rt nexthop fd00::1 counter
add rule inet filter output ether type ip rt nexthop 192.168.0.1 counter
add rule inet filter output ether type ip6 rt nexthop fd00::1 counter