summaryrefslogtreecommitdiffstats
path: root/tests/match_target.t
diff options
context:
space:
mode:
Diffstat (limited to 'tests/match_target.t')
-rw-r--r--tests/match_target.t16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/match_target.t b/tests/match_target.t
index 1739fae..02a0ea3 100644
--- a/tests/match_target.t
+++ b/tests/match_target.t
@@ -88,4 +88,20 @@
0 ./check_klog.sh 10.255.255.64 udp 1025 mark
# Destroy sets and rules
0 ./iptables.sh inet stop
+# Create test set and iptables rules
+0 ./iptables.sh inet add
+# Send probe packet from 10.255.255.64,udp:1025
+0 sendip -p ipv4 -id 127.0.0.1 -is 10.255.255.64 -p udp -ud 80 -us 1025 127.0.0.1
+# Check that 10.255.255.64 is added to the set
+0 ipset t test 10.255.255.64
+# Flush set
+0 ipset f test
+# Add a /24 network to the set
+0 ipset a test 1.1.1.0/24
+# Send probe packet from 10.255.255.64,udp:1025 again
+0 sendip -p ipv4 -id 127.0.0.1 -is 10.255.255.64 -p udp -ud 80 -us 1025 127.0.0.1
+# Check that 10.255.255.0/24 is added to the set
+0 ipset t test 10.255.255.0/24
+# Destroy sets and rules
+0 ./iptables.sh inet stop
# eof