57 lines
2.0 KiB
Diff
57 lines
2.0 KiB
Diff
|
From 0be3d6ba5d6a1cb17c965a5454cc156fbb2ac867 Mon Sep 17 00:00:00 2001
|
||
|
From: Eric Garver <eric@garver.life>
|
||
|
Date: Wed, 15 Sep 2021 13:47:01 -0400
|
||
|
Subject: [PATCH 41/50] test(rich): source address with netmask
|
||
|
|
||
|
Coverage: rhbz1917766
|
||
|
(cherry picked from commit 9e9f94061b129e22e8c6fc2f8985d782bfe09689)
|
||
|
(cherry picked from commit 498c6b221ebbca09401ae5f98498c6a148ae602f)
|
||
|
---
|
||
|
src/tests/regression/regression.at | 1 +
|
||
|
src/tests/regression/rhbz1917766.at | 24 ++++++++++++++++++++++++
|
||
|
2 files changed, 25 insertions(+)
|
||
|
create mode 100644 src/tests/regression/rhbz1917766.at
|
||
|
|
||
|
diff --git a/src/tests/regression/regression.at b/src/tests/regression/regression.at
|
||
|
index ba41a56b29b5..f9d42d6e2765 100644
|
||
|
--- a/src/tests/regression/regression.at
|
||
|
+++ b/src/tests/regression/regression.at
|
||
|
@@ -43,3 +43,4 @@ m4_include([regression/rhbz1940928.at])
|
||
|
m4_include([regression/rhbz1936896.at])
|
||
|
m4_include([regression/rhbz1914935.at])
|
||
|
m4_include([regression/gh696.at])
|
||
|
+m4_include([regression/rhbz1917766.at])
|
||
|
diff --git a/src/tests/regression/rhbz1917766.at b/src/tests/regression/rhbz1917766.at
|
||
|
new file mode 100644
|
||
|
index 000000000000..b25d0a2f9740
|
||
|
--- /dev/null
|
||
|
+++ b/src/tests/regression/rhbz1917766.at
|
||
|
@@ -0,0 +1,24 @@
|
||
|
+FWD_START_TEST([rich rule source with netmask])
|
||
|
+AT_KEYWORDS(rich rhbz1917766)
|
||
|
+
|
||
|
+dnl Note: IPv6 only supports CIDR notation. It does not support address/netmask
|
||
|
+dnl notation.
|
||
|
+
|
||
|
+FWD_CHECK([ --zone public --add-rich-rule='rule family=ipv4 source address="192.168.1.0/255.255.255.0" accept'], 0, [ignore])
|
||
|
+FWD_CHECK([--permanent --zone public --add-rich-rule='rule family=ipv4 source address="192.168.1.0/255.255.255.0" accept'], 0, [ignore])
|
||
|
+
|
||
|
+AT_DATA([./zones/foobar.xml], [dnl
|
||
|
+<?xml version="1.0" encoding="utf-8"?>
|
||
|
+<zone>
|
||
|
+ <short>foobar</short>
|
||
|
+ <description>foobar</description>
|
||
|
+ <rule family="ipv4">
|
||
|
+ <source address="192.168.0.1/255.255.255.240"/>
|
||
|
+ <accept/>
|
||
|
+ </rule>
|
||
|
+</zone>
|
||
|
+])
|
||
|
+FWD_RELOAD()
|
||
|
+FWD_CHECK([--zone foobar --add-interface foobar0], 0, [ignore])
|
||
|
+
|
||
|
+FWD_END_TEST()
|
||
|
--
|
||
|
2.27.0
|
||
|
|