|
|
bb602c |
From 2c1a48c8582999fca128ae1294642adb23744a2b Mon Sep 17 00:00:00 2001
|
|
|
bb602c |
From: Eric Garver <eric@garver.life>
|
|
|
bb602c |
Date: Wed, 29 Jan 2020 10:56:06 -0500
|
|
|
bb602c |
Subject: [PATCH 143/146] chore: test: retab some test cases
|
|
|
bb602c |
|
|
|
bb602c |
Replace leading tabs with spaces.
|
|
|
bb602c |
|
|
|
bb602c |
(cherry picked from commit 890d8a60893a0c3975b792bcbd3a6c65419a8e8c)
|
|
|
bb602c |
(cherry picked from commit 2fd061c833a6d9836a5062ec79898bd1ca6d97cd)
|
|
|
bb602c |
---
|
|
|
bb602c |
src/tests/features/helpers_custom.at | 30 ++++++-------
|
|
|
bb602c |
src/tests/regression/gh453.at | 64 ++++++++++++++--------------
|
|
|
bb602c |
src/tests/regression/rhbz1506742.at | 2 +-
|
|
|
bb602c |
src/tests/regression/rhbz1734765.at | 28 ++++++------
|
|
|
bb602c |
4 files changed, 62 insertions(+), 62 deletions(-)
|
|
|
bb602c |
|
|
|
bb602c |
diff --git a/src/tests/features/helpers_custom.at b/src/tests/features/helpers_custom.at
|
|
|
bb602c |
index fd59d06ba4d1..06464f7b5b44 100644
|
|
|
bb602c |
--- a/src/tests/features/helpers_custom.at
|
|
|
bb602c |
+++ b/src/tests/features/helpers_custom.at
|
|
|
bb602c |
@@ -20,29 +20,29 @@ dnl default now-a-days.
|
|
|
bb602c |
AT_SKIP_IF([NS_CMD([sh -c 'test "$(sysctl -n net.netfilter.nf_conntrack_helper)" -eq "1"'])])
|
|
|
bb602c |
|
|
|
bb602c |
NFT_LIST_RULES([inet], [filter_IN_public_allow], 0, [dnl
|
|
|
bb602c |
- table inet firewalld {
|
|
|
bb602c |
- chain filter_IN_public_allow {
|
|
|
bb602c |
- tcp dport 22 ct state new,untracked accept
|
|
|
bb602c |
- ip6 daddr fe80::/64 udp dport 546 ct state new,untracked accept
|
|
|
bb602c |
- tcp dport 2121 ct helper set "helper-ftptest-tcp"
|
|
|
bb602c |
- tcp dport 2121 ct state new,untracked accept
|
|
|
bb602c |
- }
|
|
|
bb602c |
- }
|
|
|
bb602c |
+ table inet firewalld {
|
|
|
bb602c |
+ chain filter_IN_public_allow {
|
|
|
bb602c |
+ tcp dport 22 ct state new,untracked accept
|
|
|
bb602c |
+ ip6 daddr fe80::/64 udp dport 546 ct state new,untracked accept
|
|
|
bb602c |
+ tcp dport 2121 ct helper set "helper-ftptest-tcp"
|
|
|
bb602c |
+ tcp dport 2121 ct state new,untracked accept
|
|
|
bb602c |
+ }
|
|
|
bb602c |
+ }
|
|
|
bb602c |
])
|
|
|
bb602c |
IPTABLES_LIST_RULES([raw], [PRE_public_allow], 0, [dnl
|
|
|
bb602c |
- CT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:2121 CT helper ftp
|
|
|
bb602c |
+ CT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:2121 CT helper ftp
|
|
|
bb602c |
])
|
|
|
bb602c |
IPTABLES_LIST_RULES([filter], [IN_public_allow], 0, [dnl
|
|
|
bb602c |
- ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:22 ctstate NEW,UNTRACKED
|
|
|
bb602c |
- ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:2121 ctstate NEW,UNTRACKED
|
|
|
bb602c |
+ ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:22 ctstate NEW,UNTRACKED
|
|
|
bb602c |
+ ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:2121 ctstate NEW,UNTRACKED
|
|
|
bb602c |
])
|
|
|
bb602c |
IP6TABLES_LIST_RULES([raw], [PRE_public_allow], 0, [dnl
|
|
|
bb602c |
- CT tcp ::/0 ::/0 tcp dpt:2121 CT helper ftp
|
|
|
bb602c |
+ CT tcp ::/0 ::/0 tcp dpt:2121 CT helper ftp
|
|
|
bb602c |
])
|
|
|
bb602c |
IP6TABLES_LIST_RULES([filter], [IN_public_allow], 0, [dnl
|
|
|
bb602c |
- ACCEPT tcp ::/0 ::/0 tcp dpt:22 ctstate NEW,UNTRACKED
|
|
|
bb602c |
- ACCEPT udp ::/0 fe80::/64 udp dpt:546 ctstate NEW,UNTRACKED
|
|
|
bb602c |
- ACCEPT tcp ::/0 ::/0 tcp dpt:2121 ctstate NEW,UNTRACKED
|
|
|
bb602c |
+ ACCEPT tcp ::/0 ::/0 tcp dpt:22 ctstate NEW,UNTRACKED
|
|
|
bb602c |
+ ACCEPT udp ::/0 fe80::/64 udp dpt:546 ctstate NEW,UNTRACKED
|
|
|
bb602c |
+ ACCEPT tcp ::/0 ::/0 tcp dpt:2121 ctstate NEW,UNTRACKED
|
|
|
bb602c |
])
|
|
|
bb602c |
|
|
|
bb602c |
FWD_END_TEST
|
|
|
bb602c |
diff --git a/src/tests/regression/gh453.at b/src/tests/regression/gh453.at
|
|
|
bb602c |
index f57a79dcf9a2..36a6fce5f22a 100644
|
|
|
bb602c |
--- a/src/tests/regression/gh453.at
|
|
|
bb602c |
+++ b/src/tests/regression/gh453.at
|
|
|
bb602c |
@@ -8,48 +8,48 @@ FWD_CHECK([-q --set-automatic-helpers=no])
|
|
|
bb602c |
|
|
|
bb602c |
FWD_CHECK([-q --add-service=ftp])
|
|
|
bb602c |
NS_CHECK([nft list ruleset | TRIM_WHITESPACE |grep -A3 "ct helper helper-ftp-tcp"], 0, [m4_strip([dnl
|
|
|
bb602c |
- ct helper helper-ftp-tcp {
|
|
|
bb602c |
- type "ftp" protocol tcp
|
|
|
bb602c |
- l3proto inet
|
|
|
bb602c |
- }
|
|
|
bb602c |
+ ct helper helper-ftp-tcp {
|
|
|
bb602c |
+ type "ftp" protocol tcp
|
|
|
bb602c |
+ l3proto inet
|
|
|
bb602c |
+ }
|
|
|
bb602c |
])])
|
|
|
bb602c |
NFT_LIST_RULES([inet], [filter_IN_public_allow], 0, [dnl
|
|
|
bb602c |
- table inet firewalld {
|
|
|
bb602c |
- chain filter_IN_public_allow {
|
|
|
bb602c |
- tcp dport 22 ct state new,untracked accept
|
|
|
bb602c |
- ip6 daddr fe80::/64 udp dport 546 ct state new,untracked accept
|
|
|
bb602c |
- tcp dport 21 ct helper set "helper-ftp-tcp"
|
|
|
bb602c |
- tcp dport 21 ct state new,untracked accept
|
|
|
bb602c |
- }
|
|
|
bb602c |
- }
|
|
|
bb602c |
+ table inet firewalld {
|
|
|
bb602c |
+ chain filter_IN_public_allow {
|
|
|
bb602c |
+ tcp dport 22 ct state new,untracked accept
|
|
|
bb602c |
+ ip6 daddr fe80::/64 udp dport 546 ct state new,untracked accept
|
|
|
bb602c |
+ tcp dport 21 ct helper set "helper-ftp-tcp"
|
|
|
bb602c |
+ tcp dport 21 ct state new,untracked accept
|
|
|
bb602c |
+ }
|
|
|
bb602c |
+ }
|
|
|
bb602c |
])
|
|
|
bb602c |
|
|
|
bb602c |
FWD_CHECK([-q --add-service=sip])
|
|
|
bb602c |
NS_CHECK([nft list ruleset | TRIM_WHITESPACE |grep -A3 "ct helper helper-sip-tcp"], 0, [m4_strip([dnl
|
|
|
bb602c |
- ct helper helper-sip-tcp {
|
|
|
bb602c |
- type "sip" protocol tcp
|
|
|
bb602c |
- l3proto inet
|
|
|
bb602c |
- }
|
|
|
bb602c |
+ ct helper helper-sip-tcp {
|
|
|
bb602c |
+ type "sip" protocol tcp
|
|
|
bb602c |
+ l3proto inet
|
|
|
bb602c |
+ }
|
|
|
bb602c |
])])
|
|
|
bb602c |
NS_CHECK([nft list ruleset | TRIM_WHITESPACE |grep -A3 "ct helper helper-sip-udp"], 0, [m4_strip([dnl
|
|
|
bb602c |
- ct helper helper-sip-udp {
|
|
|
bb602c |
- type "sip" protocol udp
|
|
|
bb602c |
- l3proto inet
|
|
|
bb602c |
- }
|
|
|
bb602c |
+ ct helper helper-sip-udp {
|
|
|
bb602c |
+ type "sip" protocol udp
|
|
|
bb602c |
+ l3proto inet
|
|
|
bb602c |
+ }
|
|
|
bb602c |
])])
|
|
|
bb602c |
NFT_LIST_RULES([inet], [filter_IN_public_allow], 0, [dnl
|
|
|
bb602c |
- table inet firewalld {
|
|
|
bb602c |
- chain filter_IN_public_allow {
|
|
|
bb602c |
- tcp dport 22 ct state new,untracked accept
|
|
|
bb602c |
- ip6 daddr fe80::/64 udp dport 546 ct state new,untracked accept
|
|
|
bb602c |
- tcp dport 21 ct helper set "helper-ftp-tcp"
|
|
|
bb602c |
- tcp dport 21 ct state new,untracked accept
|
|
|
bb602c |
- tcp dport 5060 ct helper set "helper-sip-tcp"
|
|
|
bb602c |
- udp dport 5060 ct helper set "helper-sip-udp"
|
|
|
bb602c |
- tcp dport 5060 ct state new,untracked accept
|
|
|
bb602c |
- udp dport 5060 ct state new,untracked accept
|
|
|
bb602c |
- }
|
|
|
bb602c |
- }
|
|
|
bb602c |
+ table inet firewalld {
|
|
|
bb602c |
+ chain filter_IN_public_allow {
|
|
|
bb602c |
+ tcp dport 22 ct state new,untracked accept
|
|
|
bb602c |
+ ip6 daddr fe80::/64 udp dport 546 ct state new,untracked accept
|
|
|
bb602c |
+ tcp dport 21 ct helper set "helper-ftp-tcp"
|
|
|
bb602c |
+ tcp dport 21 ct state new,untracked accept
|
|
|
bb602c |
+ tcp dport 5060 ct helper set "helper-sip-tcp"
|
|
|
bb602c |
+ udp dport 5060 ct helper set "helper-sip-udp"
|
|
|
bb602c |
+ tcp dport 5060 ct state new,untracked accept
|
|
|
bb602c |
+ udp dport 5060 ct state new,untracked accept
|
|
|
bb602c |
+ }
|
|
|
bb602c |
+ }
|
|
|
bb602c |
])
|
|
|
bb602c |
|
|
|
bb602c |
FWD_END_TEST
|
|
|
bb602c |
diff --git a/src/tests/regression/rhbz1506742.at b/src/tests/regression/rhbz1506742.at
|
|
|
bb602c |
index 1e5d34995add..0e74bfb1305c 100644
|
|
|
bb602c |
--- a/src/tests/regression/rhbz1506742.at
|
|
|
bb602c |
+++ b/src/tests/regression/rhbz1506742.at
|
|
|
bb602c |
@@ -18,4 +18,4 @@ FWD_CHECK([-q --ipset=foobar --query-entry=1.2.3.4], 32, ignore, ignore)
|
|
|
bb602c |
FWD_CHECK([-q --ipset=foobar --remove-entries-from-file=foobar_entries.txt])
|
|
|
bb602c |
FWD_END_TEST([-e '/Error: IPSET_WITH_TIMEOUT/d' dnl
|
|
|
bb602c |
-e '/ERROR: IPSET_WITH_TIMEOUT/d' dnl
|
|
|
bb602c |
- -e '/WARNING: NOT_ENABLED/d'])
|
|
|
bb602c |
+ -e '/WARNING: NOT_ENABLED/d'])
|
|
|
bb602c |
diff --git a/src/tests/regression/rhbz1734765.at b/src/tests/regression/rhbz1734765.at
|
|
|
bb602c |
index 60cd18a6a6ea..5590ab5970da 100644
|
|
|
bb602c |
--- a/src/tests/regression/rhbz1734765.at
|
|
|
bb602c |
+++ b/src/tests/regression/rhbz1734765.at
|
|
|
bb602c |
@@ -44,22 +44,22 @@ FWD_CHECK([-q --permanent --zone=trusted --add-interface=foobar1])
|
|
|
bb602c |
FWD_RELOAD
|
|
|
bb602c |
|
|
|
bb602c |
NFT_LIST_SET([ipsetv4], 0, [dnl
|
|
|
bb602c |
- table inet firewalld {
|
|
|
bb602c |
- set ipsetv4 {
|
|
|
bb602c |
- type ipv4_addr
|
|
|
bb602c |
- flags interval
|
|
|
bb602c |
- elements = { 192.0.2.12 }
|
|
|
bb602c |
- }
|
|
|
bb602c |
- }
|
|
|
bb602c |
+ table inet firewalld {
|
|
|
bb602c |
+ set ipsetv4 {
|
|
|
bb602c |
+ type ipv4_addr
|
|
|
bb602c |
+ flags interval
|
|
|
bb602c |
+ elements = { 192.0.2.12 }
|
|
|
bb602c |
+ }
|
|
|
bb602c |
+ }
|
|
|
bb602c |
])
|
|
|
bb602c |
NFT_LIST_SET([ipsetv6], 0, [dnl
|
|
|
bb602c |
- table inet firewalld {
|
|
|
bb602c |
- set ipsetv6 {
|
|
|
bb602c |
- type ipv6_addr
|
|
|
bb602c |
- flags interval
|
|
|
bb602c |
- elements = { ::2 }
|
|
|
bb602c |
- }
|
|
|
bb602c |
- }
|
|
|
bb602c |
+ table inet firewalld {
|
|
|
bb602c |
+ set ipsetv6 {
|
|
|
bb602c |
+ type ipv6_addr
|
|
|
bb602c |
+ flags interval
|
|
|
bb602c |
+ elements = { ::2 }
|
|
|
bb602c |
+ }
|
|
|
bb602c |
+ }
|
|
|
bb602c |
])
|
|
|
bb602c |
|
|
|
bb602c |
FWD_CHECK([-q --zone=foobar_010 --add-source="10.10.10.10"])
|
|
|
bb602c |
--
|
|
|
bb602c |
2.23.0
|
|
|
bb602c |
|