Skip to contentSkip to conversation

tests: shell: set lookup and set update

PATCH New Pablo Neira Ayuso 1 participant 2 messages Jan 22, 2020 netfilter

lore
Share & tools
lore

Pablo Neira Ayuso

author maintainer
#0 lore raw

PATCH 1/2 tests: shell: set lookup and set update

A simple test to cover set lookup and update in one rule.

---
 tests/shell/testcases/sets/0042update_set_0 | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
 create mode 100755 tests/shell/testcases/sets/0042update_set_0
tests/shell/testcases/sets/0042update_set_0 new file +21 -0
new file mode 100755
index 000000000000..a8e9e05f0f2e
@@ -0,0 +1,21 @@
+#!/bin/bash
+
+set -e
+
+RULESET="table ip t {
+        set set1 {
+                type ether_addr
+        }
+
+        set set2 {
+                type ether_addr
+                size 65535
+                flags dynamic
+        }
+
+        chain c {
+                ether daddr @set1 add @set2 { ether daddr counter }
+        }
+}"
+
+$NFT -f - <<< "$RULESET" || { echo "can't apply basic ruleset"; exit 1; }
Signature · 1 line
2.11.0
author maintainer
#1 lore raw

PATCH 2/2 tests: shell: update list of rmmod modules

* Missing nft_fib_inet.
* nft_chain_nat_ipv4 and nft_chain_nat_ipv6 became nft_chain_nat.

---
 tests/shell/run-tests.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tests/shell/run-tests.sh +2 -2
index 29a2c3988cdc..2c4154898805 100755
@@ -73,10 +73,10 @@ kernel_cleanup() {
 	nft_exthdr nft_payload nft_cmp nft_range \
 	nft_quota nft_queue nft_numgen nft_osf nft_socket nft_tproxy \
 	nft_meta nft_meta_bridge nft_counter nft_log nft_limit \
-	nft_fib nft_fib_ipv4 nft_fib_ipv6 \
+	nft_fib nft_fib_ipv4 nft_fib_ipv6 nft_fib_inet \
 	nft_hash nft_ct nft_compat nft_rt nft_objref \
 	nft_set_hash nft_set_rbtree nft_set_bitmap \
-	nft_chain_nat_ipv4 nft_chain_nat_ipv6 \
+	nft_chain_nat \
 	nft_chain_route_ipv4 nft_chain_route_ipv6 \
 	nft_dup_netdev nft_fwd_netdev \
 	nft_reject nft_reject_inet \
Signature · 1 line
2.11.0