|
|
ea8ea4 |
From 74299cc917244ede3bb1cf87345123e898c73a12 Mon Sep 17 00:00:00 2001
|
|
|
ea8ea4 |
From: Eric Garver <eric@garver.life>
|
|
|
ea8ea4 |
Date: Thu, 27 Feb 2020 08:45:36 -0500
|
|
|
ea8ea4 |
Subject: [PATCH 151/154] test: more coverage for ipv6 addresses with brackets
|
|
|
ea8ea4 |
|
|
|
ea8ea4 |
This covers other features: zone source, forward ports, rich rule
|
|
|
ea8ea4 |
source/destination.
|
|
|
ea8ea4 |
|
|
|
ea8ea4 |
(cherry picked from commit 229a6f3c21f3b1ce8c3759c3ead65e750e31dd32)
|
|
|
ea8ea4 |
(cherry picked from commit 9c480863fca64923aafa8483f7603b9b14c0a0e0)
|
|
|
ea8ea4 |
---
|
|
|
ea8ea4 |
src/tests/regression/rhbz1779835.at | 17 ++++++++++++++++-
|
|
|
ea8ea4 |
1 file changed, 16 insertions(+), 1 deletion(-)
|
|
|
ea8ea4 |
|
|
|
ea8ea4 |
diff --git a/src/tests/regression/rhbz1779835.at b/src/tests/regression/rhbz1779835.at
|
|
|
ea8ea4 |
index 2662271eb459..37d1afc990ab 100644
|
|
|
ea8ea4 |
--- a/src/tests/regression/rhbz1779835.at
|
|
|
ea8ea4 |
+++ b/src/tests/regression/rhbz1779835.at
|
|
|
ea8ea4 |
@@ -1,5 +1,5 @@
|
|
|
ea8ea4 |
FWD_START_TEST([ipv6 address with brackets])
|
|
|
ea8ea4 |
-AT_KEYWORDS(rhbz1779835 ipset)
|
|
|
ea8ea4 |
+AT_KEYWORDS(rhbz1779835 ipset zone forward_port rich)
|
|
|
ea8ea4 |
|
|
|
ea8ea4 |
dnl ipset
|
|
|
ea8ea4 |
FWD_CHECK([-q --permanent --new-ipset=foobar --type=hash:ip --family=inet6])
|
|
|
ea8ea4 |
@@ -8,4 +8,19 @@ FWD_CHECK([-q --permanent --new-ipset=foobar2 --type=hash:net --family=inet6])
|
|
|
ea8ea4 |
FWD_CHECK([[-q --permanent --ipset foobar2 --add-entry='[1234::]/64']])
|
|
|
ea8ea4 |
FWD_RELOAD
|
|
|
ea8ea4 |
|
|
|
ea8ea4 |
+dnl zone source
|
|
|
ea8ea4 |
+FWD_CHECK([[-q --zone internal --add-source='[::1234]']])
|
|
|
ea8ea4 |
+FWD_CHECK([[-q --zone internal --add-source='[1234::]/64']])
|
|
|
ea8ea4 |
+
|
|
|
ea8ea4 |
+dnl forward ports
|
|
|
ea8ea4 |
+FWD_CHECK([[-q --zone internal --add-forward-port=port=1234:proto=tcp:toport=4321:toaddr=[::1234]]])
|
|
|
ea8ea4 |
+FWD_CHECK([[-q --zone internal --add-rich-rule='rule family=ipv6 source address=[::4321] forward-port port="1234" protocol=tcp to-port="4321" to-addr="[::1234]"']])
|
|
|
ea8ea4 |
+FWD_CHECK([[-q --zone internal --add-rich-rule='rule family=ipv6 source address=[1234::]/64 forward-port port="1234" protocol=tcp to-port="4321" to-addr="[::1234]"']])
|
|
|
ea8ea4 |
+
|
|
|
ea8ea4 |
+dnl rich rule source/destination
|
|
|
ea8ea4 |
+FWD_CHECK([[-q --zone internal --add-rich-rule='rule family=ipv6 source address=[::4321] accept']])
|
|
|
ea8ea4 |
+FWD_CHECK([[-q --zone internal --add-rich-rule='rule family=ipv6 source address=[1234::]/64 accept']])
|
|
|
ea8ea4 |
+FWD_CHECK([[-q --zone internal --add-rich-rule='rule family=ipv6 destination address=[::4321] accept']])
|
|
|
ea8ea4 |
+FWD_CHECK([[-q --zone internal --add-rich-rule='rule family=ipv6 destination address=[1234::]/64 accept']])
|
|
|
ea8ea4 |
+
|
|
|
ea8ea4 |
FWD_END_TEST
|
|
|
ea8ea4 |
--
|
|
|
ea8ea4 |
2.25.2
|
|
|
ea8ea4 |
|