Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F115670368
D47793.id148145.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
805 B
Referenced Files
None
Subscribers
None
D47793.id148145.diff
View Options
diff --git a/tests/sys/netpfil/pf/nat64.sh b/tests/sys/netpfil/pf/nat64.sh
--- a/tests/sys/netpfil/pf/nat64.sh
+++ b/tests/sys/netpfil/pf/nat64.sh
@@ -111,8 +111,39 @@
pft_cleanup
}
+atf_test_case "udp" "cleanup"
+udp_head()
+{
+ atf_set descr 'UDP NAT64 test'
+ atf_set require.user root
+}
+
+udp_body()
+{
+ nat64_setup
+
+ echo "foo" | jexec dst nc -u -l 1234 &
+
+ # Sanity check & delay for nc startup
+ atf_check -s exit:0 -o ignore \
+ ping6 -c 1 64:ff9b::192.0.2.2
+
+ rcv=$(echo bar | nc -w 3 -6 -u 64:ff9b::c000:202 1234)
+ if [ "${rcv}" != "foo" ];
+ then
+ echo "rcv=${rcv}"
+ atf_fail "Failed to connect to UDP server"
+ fi
+}
+
+udp_cleanup()
+{
+ pft_cleanup
+}
+
atf_init_test_cases()
{
atf_add_test_case "icmp_echo"
atf_add_test_case "tcp"
+ atf_add_test_case "udp"
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Apr 27, 9:29 PM (14 h, 45 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
17822062
Default Alt Text
D47793.id148145.diff (805 B)
Attached To
Mode
D47793: pf tests: add a UDP test case for nat64
Attached
Detach File
Event Timeline
Log In to Comment