[PATCH nft] tests: shell: Add test for IPv4 Mapped IPv6 address.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This patch adds test case for IPv4 Mapped IPv6 address and renames
file 0025named_limit_0 to 0026named_limit_0.

Signed-off-by: Varsha Rao <rvarsha016@xxxxxxxxx>
---
 .../sets/{0025named_limit_0 => 0026named_limit_0}  |  0
 tests/shell/testcases/sets/0027ipv6_maps_ipv4_0    | 25 ++++++++++++++++++++++
 2 files changed, 25 insertions(+)
 rename tests/shell/testcases/sets/{0025named_limit_0 => 0026named_limit_0} (100%)
 create mode 100755 tests/shell/testcases/sets/0027ipv6_maps_ipv4_0

diff --git a/tests/shell/testcases/sets/0025named_limit_0 b/tests/shell/testcases/sets/0026named_limit_0
similarity index 100%
rename from tests/shell/testcases/sets/0025named_limit_0
rename to tests/shell/testcases/sets/0026named_limit_0
diff --git a/tests/shell/testcases/sets/0027ipv6_maps_ipv4_0 b/tests/shell/testcases/sets/0027ipv6_maps_ipv4_0
new file mode 100755
index 0000000..5420fbf
--- /dev/null
+++ b/tests/shell/testcases/sets/0027ipv6_maps_ipv4_0
@@ -0,0 +1,25 @@
+#!/bin/bash
+
+# Tests IPv4 Mapped IPv6 addresses.
+
+set -e
+
+tmpfile=$(mktemp)
+if [ ! -w $tmpfile ] ; then
+	echo "Failed to create tmp file" >&2
+	exit 0
+fi
+
+trap "rm -rf $tmpfile" EXIT # cleanup if aborted
+
+echo "
+table inet t {
+	set s {
+		type ipv6_addr
+		flags interval
+		elements = { ::ffff:0.0.0.0/96 }
+	}
+}
+" > $tmpfile
+
+$NFT -f $tmpfile
-- 
2.14.3

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux