|
|
c8bceb |
From 32e94d98bb52ea5c1c8d2d43beea9381b9f629b8 Mon Sep 17 00:00:00 2001
|
|
|
c8bceb |
From: Eric Garver <e@erig.me>
|
|
|
c8bceb |
Date: Fri, 7 Dec 2018 09:34:27 -0500
|
|
|
c8bceb |
Subject: [PATCH 35/73] tests/functions: normalize nft list rule output
|
|
|
c8bceb |
|
|
|
c8bceb |
nftables commit 6dd848339444 ("src: meta: always prefix 'meta' for
|
|
|
c8bceb |
almost all tokens") made the "mark" output always be prefixd by "meta".
|
|
|
c8bceb |
To be compatible with old nft version, strip the meta keyword.
|
|
|
c8bceb |
|
|
|
c8bceb |
Fix test cases as well.
|
|
|
c8bceb |
|
|
|
c8bceb |
(cherry picked from commit 3e56d69f5702bbf326dd6701e329aa1e98071b7a)
|
|
|
c8bceb |
(cherry picked from commit 0e3cc0f0417774c80bd1cffd9a1249bf434bfd67)
|
|
|
c8bceb |
---
|
|
|
c8bceb |
src/tests/functions.at | 6 +++++-
|
|
|
c8bceb |
1 file changed, 5 insertions(+), 1 deletion(-)
|
|
|
c8bceb |
|
|
|
c8bceb |
diff --git a/src/tests/functions.at b/src/tests/functions.at
|
|
|
c8bceb |
index cb23b109a105..6af0c31c422a 100644
|
|
|
c8bceb |
--- a/src/tests/functions.at
|
|
|
c8bceb |
+++ b/src/tests/functions.at
|
|
|
c8bceb |
@@ -243,9 +243,13 @@ m4_define([IP6TABLES_LIST_RULES], [
|
|
|
c8bceb |
])
|
|
|
c8bceb |
|
|
|
c8bceb |
m4_define([NFT_LIST_RULES], [
|
|
|
c8bceb |
+ dnl nftables commit 6dd848339444 change list output to show "meta mark"
|
|
|
c8bceb |
+ dnl instead of just "mark".
|
|
|
c8bceb |
+ m4_define([NFT_LIST_RULES_NORMALIZE], [sed -e 's/meta mark/mark/g'])
|
|
|
c8bceb |
m4_ifdef([TESTING_FIREWALL_OFFLINE_CMD], [], [
|
|
|
c8bceb |
- NS_CHECK([nft -nn list chain $1 firewalld $2 | TRIM_WHITESPACE], [$3], [m4_strip([$4])], [m4_strip([$5])], [$6], [$7])
|
|
|
c8bceb |
+ NS_CHECK([nft -nn list chain $1 firewalld $2 | TRIM_WHITESPACE | NFT_LIST_RULES_NORMALIZE], [$3], [m4_strip([$4])], [m4_strip([$5])], [$6], [$7])
|
|
|
c8bceb |
])
|
|
|
c8bceb |
+ m4_undefine([NFT_LIST_RULES_NORMALIZE])
|
|
|
c8bceb |
])
|
|
|
c8bceb |
|
|
|
c8bceb |
m4_define([IPSET_LIST_SET], [
|
|
|
c8bceb |
--
|
|
|
c8bceb |
2.20.1
|
|
|
c8bceb |
|