Blame SOURCES/0035-tests-functions-normalize-nft-list-rule-output.patch

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