From: Varsha Rao <rvarsha016@gmail.com>
To: Pablo Neira Ayuso <pablo@netfilter.org>, netfilter-devel@vger.kernel.org
Cc: Varsha Rao <rvarsha016@gmail.com>
Subject: [PATCH nft] tests: shell: Add test for IPv4 Mapped IPv6 address.
Date: Sun, 19 Nov 2017 18:04:32 +0530 [thread overview]
Message-ID: <20171119123432.8894-1-rvarsha016@gmail.com> (raw)
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@gmail.com>
---
.../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
next reply other threads:[~2017-11-19 12:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-19 12:34 Varsha Rao [this message]
2017-11-20 13:28 ` [PATCH nft] tests: shell: Add test for IPv4 Mapped IPv6 address Pablo Neira Ayuso
2017-11-23 4:13 ` Varsha Rao
2017-11-26 2:37 ` Varsha Rao
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171119123432.8894-1-rvarsha016@gmail.com \
--to=rvarsha016@gmail.com \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).