Blame SOURCES/0039-fix-tests-nftables-constant-set-compat-between-relea.patch

136e2c
From 5d1ee5889bacf65a0d386a56a7b75f49a44e9bf7 Mon Sep 17 00:00:00 2001
136e2c
From: Eric Garver <eric@garver.life>
136e2c
Date: Wed, 1 May 2019 14:41:33 -0400
136e2c
Subject: [PATCH 39/73] fix: tests nftables: constant set compat between
136e2c
 releases
136e2c
136e2c
For newer versions (>0.9.0) of nftables, matches against sets of
136e2c
constants are output using the set notation. To be compatible with older
136e2c
releases we need some sed magic.
136e2c
136e2c
(cherry picked from commit b7656e99ccf7c64961416e81b11ab5dbc1869694)
136e2c
(cherry picked from commit f6b417f9786f81701d2c63b234f7029e528b0ab2)
136e2c
---
136e2c
 src/tests/functions.at | 4 +++-
136e2c
 1 file changed, 3 insertions(+), 1 deletion(-)
136e2c
136e2c
diff --git a/src/tests/functions.at b/src/tests/functions.at
136e2c
index ca9224476a56..729bfc0dfc6a 100644
136e2c
--- a/src/tests/functions.at
136e2c
+++ b/src/tests/functions.at
136e2c
@@ -247,7 +247,9 @@ m4_define([NFT_LIST_RULES], [
136e2c
     dnl instead of just "mark".
136e2c
     m4_define([NFT_LIST_RULES_NORMALIZE], [dnl
136e2c
         sed -e 's/meta mark/mark/g'dnl
136e2c
-        | sed -e '/type.*hook.*priority.*policy.*/d'dnl
136e2c
+            -e '/type.*hook.*priority.*policy.*/d'dnl
136e2c
+            dnl tranform ct state { established,related } to ct state established,related
136e2c
+            -e '/ct \(state\|status\)/{s/\(ct \(state\|status\)\) {/\1/g; s/ }//; s/\(@<:@a-z@:>@*\), /\1,/g;}' dnl
136e2c
     ])
136e2c
 
136e2c
     m4_ifdef([TESTING_FIREWALL_OFFLINE_CMD], [], [
136e2c
-- 
136e2c
2.20.1
136e2c