summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/files/expr-rt21
-rwxr-xr-xtests/shell/run-tests.sh2
2 files changed, 22 insertions, 1 deletions
diff --git a/tests/files/expr-rt b/tests/files/expr-rt
new file mode 100644
index 00000000..4c154091
--- /dev/null
+++ b/tests/files/expr-rt
@@ -0,0 +1,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
diff --git a/tests/shell/run-tests.sh b/tests/shell/run-tests.sh
index ff243444..d9c44c80 100755
--- a/tests/shell/run-tests.sh
+++ b/tests/shell/run-tests.sh
@@ -57,7 +57,7 @@ kernel_cleanup() {
nft_exthdr nft_payload nft_cmp nft_range \
nft_quota nft_queue nft_numgen \
nft_meta nft_meta_bridge nft_counter nft_log nft_limit \
- nft_hash nft_ct nft_compat \
+ nft_hash nft_ct nft_compat nft_rt \
nft_set_hash nft_set_rbtree \
nft_chain_nat_ipv4 nft_chain_nat_ipv6 \
nf_tables_inet nf_tables_bridge nf_tables_arp \